summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-11-25 14:33:28 +0100
committerLars-Dominik Braun <lars@6xq.net>2017-11-25 14:33:28 +0100
commit85d51603acdc19d6cafe47307f279eb6c4df1a03 (patch)
tree85c3eb2fefaac2857bdbfbeec68a9abd13e4b843 /crocoite
parent39b18663ebf045c1cb7a9ee1c40bacd45c785ee3 (diff)
downloadcrocoite-85d51603acdc19d6cafe47307f279eb6c4df1a03.tar.gz
crocoite-85d51603acdc19d6cafe47307f279eb6c4df1a03.tar.bz2
crocoite-85d51603acdc19d6cafe47307f279eb6c4df1a03.zip
Workaround broken device metrics reset
Apparently neither width=0, height=0 nor clearDeviceMetricsOverride() do what they should, so manually reset to 1080p screen size.
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/cli.py4
1 files changed, 3 insertions, 1 deletions
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)