From c676a707ecce8d1f0c7b7831db45133642620015 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 2 Dec 2018 11:57:05 +0100 Subject: behavior: Re-enable clearDeviceMetricsOverride Seems to be working again. Chrome bug? --- crocoite/behavior.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crocoite') diff --git a/crocoite/behavior.py b/crocoite/behavior.py index f11af6b..36f51fa 100644 --- a/crocoite/behavior.py +++ b/crocoite/behavior.py @@ -177,8 +177,6 @@ class EmulateScreenMetrics (Behavior): {'width': 320, 'height': 480, 'deviceScaleFactor': 163/cssPpi, 'mobile': True}, # 6th gen iPhone (portrait mode) {'width': 750, 'height': 1334, 'deviceScaleFactor': 326/cssPpi, 'mobile': True}, - # and reset - {'width': 1920, 'height': 1080, 'deviceScaleFactor': 1, 'mobile': False}, ] l = self.loader tab = l.tab @@ -187,8 +185,7 @@ class EmulateScreenMetrics (Behavior): # give the browser time to re-eval page and start requests # XXX: should wait until loader is not busy any more await asyncio.sleep (1) - # XXX: this seems to be broken, it does not clear the override - #tab.Emulation.clearDeviceMetricsOverride () + await tab.Emulation.clearDeviceMetricsOverride () return yield -- cgit v1.2.3