Bug 1526583 [wpt PR 15222] - Try and improve #15159 by moving the window to a deterministic location, a=testonly
authorGeoffrey Sneddon <me@gsnedders.com>
Mon, 18 Feb 2019 19:24:38 +0000
changeset 519165 186ecc82160b10a9a8054bc9107613200a134090
parent 519164 fd8d22dc10c55a03472e03b25555414a263d916c
child 519166 279b6fb55b9237377c7e857d584dee387efbd5e1
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1526583, 15222, 15159
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1526583 [wpt PR 15222] - Try and improve #15159 by moving the window to a deterministic location, a=testonly Automatic update from web-platform-tests Try and improve #15159 by moving the window to a deterministic location Especially on systems where we don't have an integral scaling factor between CSS pixels and device pixels we can end up with our ability to resize the window depending on the location of the window. -- wpt-commits: 71a17e293b836649a0cd7effd6ee5b89ba39414d wpt-pr: 15222
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py
@@ -367,17 +367,17 @@ class SeleniumRefTestExecutor(RefTestExe
 
     def do_test(self, test):
         self.logger.info("Test requires OS-level window focus")
 
         width_offset, height_offset = self.protocol.webdriver.execute_script(
             """return [window.outerWidth - window.innerWidth,
                        window.outerHeight - window.innerHeight];"""
         )
-        self.protocol.webdriver.set_window_size(600 + width_offset, 600 + height_offset)
+        self.protocol.webdriver.set_window_rect(0, 0, 600 + width_offset, 600 + height_offset)
 
         result = self.implementation.run_test(test)
 
         return self.convert_result(test, result)
 
     def screenshot(self, test, viewport_size, dpi):
         # https://github.com/w3c/wptrunner/issues/166
         assert viewport_size is None
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
@@ -400,16 +400,17 @@ class WebDriverRefTestExecutor(RefTestEx
     def is_alive(self):
         return self.protocol.is_alive()
 
     def do_test(self, test):
         width_offset, height_offset = self.protocol.webdriver.execute_script(
             """return [window.outerWidth - window.innerWidth,
                        window.outerHeight - window.innerHeight];"""
         )
+        self.protocol.webdriver.window.position = (0, 0)
         self.protocol.webdriver.window.size = (600 + width_offset, 600 + height_offset)
 
         result = self.implementation.run_test(test)
 
         return self.convert_result(test, result)
 
     def screenshot(self, test, viewport_size, dpi):
         # https://github.com/w3c/wptrunner/issues/166
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js
@@ -1,1 +1,1 @@
-var win = window.open("about:blank", "test", "width=600,height=600");
+var win = window.open("about:blank", "test", "left=0,top=0,width=600,height=600");