Bug 1526583 [wpt PR 15222] - Try and improve #15159 by moving the window to a deterministic location, a=testonly
☠☠ backed out by 749b314d6c28 ☠ ☠
authorGeoffrey Sneddon <me@gsnedders.com>
Mon, 18 Feb 2019 19:24:38 +0000
changeset 460259 855b3f20c07099106d46f0c17cfe9a03696d440a
parent 460258 d84c9dfa9d2c934d35be98b476b882a6c39a4029
child 460260 fa56083af14043f3d87cc1826ef263309a40db6d
push id112074
push userwptsync@mozilla.com
push dateThu, 21 Feb 2019 19:59:15 +0000
treeherdermozilla-inbound@a15983fcecca [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");