From 85d51603acdc19d6cafe47307f279eb6c4df1a03 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 25 Nov 2017 14:33:28 +0100 Subject: Workaround broken device metrics reset Apparently neither width=0, height=0 nor clearDeviceMetricsOverride() do what they should, so manually reset to 1080p screen size. --- crocoite/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crocoite/cli.py b/crocoite/cli.py index fee72c1..7a29cc7 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -387,11 +387,13 @@ def main (): # 6th gen iPhone (portrait mode) {'width': 750, 'height': 1334, 'deviceScaleFactor': 326/cssPpi, 'mobile': True}, # and reset - {'width': 0, 'height': 0, 'deviceScaleFactor': 0, 'mobile': False}, + {'width': 1920, 'height': 1080, 'deviceScaleFactor': 1, 'mobile': False}, ] for s in sizes: tab.Emulation.setDeviceMetricsOverride (**s) tab.wait (1) + # XXX: this seems to be broken, it does not clear the override + #tab.Emulation.clearDeviceMetricsOverride () # wait until assets finished loading while len (requests) != 0: tab.wait (1) -- cgit v1.2.3