Bug 1517587 - [marionette] Get/Set Window Rect should not return window state. r=ato
authorHenrik Skupin <mail@hskupin.info>
Fri, 04 Jan 2019 13:51:24 +0000
changeset 509649 13be012a1bae66047edf1e12ad371ff2e7f81712
parent 509648 6ff27f273550168fa5dab4b1fd78813a259820c8
child 509650 165704210c3f00629f0e4a148f75c1b9e5160231
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1517587
milestone66.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 1517587 - [marionette] Get/Set Window Rect should not return window state. r=ato As decided during the last TPAC meeting the window rect commands should not return the window state. Differential Revision: https://phabricator.services.mozilla.com/D15681
testing/marionette/browser.js
testing/marionette/harness/marionette_harness/tests/unit/test_window_minimize.py
testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini
--- a/testing/marionette/browser.js
+++ b/testing/marionette/browser.js
@@ -254,17 +254,16 @@ browser.Context = class {
    *     Object with |x|, |y|, |width|, and |height| properties.
    */
   get rect() {
     return {
       x: this.window.screenX,
       y: this.window.screenY,
       width: this.window.outerWidth,
       height: this.window.outerHeight,
-      state: WindowState.from(this.window.windowState),
     };
   }
 
   /**
    * Retrieves the current tabmodal UI object.  According to the browser
    * associated with the currently selected tab.
    */
   getTabModalUI() {
deleted file mode 100644
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_window_minimize.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from __future__ import absolute_import
-
-from marionette_driver.errors import InvalidArgumentException
-
-from marionette_harness import MarionetteTestCase
-
-class TestWindowMinimize(MarionetteTestCase):
-
-    def setUp(self):
-        MarionetteTestCase.setUp(self)
-
-        self.original_size = self.marionette.window_rect
-
-    def is_minimized(self):
-        return self.marionette.execute_script("return document.hidden", sandbox=None)
-
-    def assert_window_minimized(self, resp):
-        self.assertEqual("minimized", resp["state"])
-
-    def assert_window_restored(self, actual):
-        self.assertEqual("normal", actual["state"])
-
-    def test_minimize_twice_is_idempotent(self):
-        self.assert_window_minimized(self.marionette.minimize_window())
-        self.assert_window_minimized(self.marionette.minimize_window())
-
-    def test_minimize_stress(self):
-        for i in range(1, 25):
-            if self.is_minimized:
-                resp = self.marionette.set_window_rect(width=800, height=600)
-                self.assert_window_restored(resp)
-            else:
-                resp = self.marionette.minimize_window()
-                self.assert_window_minimized(resp)
--- a/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini
+++ b/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini
@@ -63,18 +63,16 @@ skip-if = appname == 'fennec'
 [test_window_handles_content.py]
 [test_window_close_chrome.py]
 skip-if = appname == 'fennec'
 [test_window_close_content.py]
 [test_window_rect.py]
 skip-if = appname == 'fennec'
 [test_window_maximize.py]
 skip-if = appname == 'fennec'
-[test_window_minimize.py]
-skip-if = appname == 'fennec' || headless
 [test_window_status_content.py]
 [test_window_status_chrome.py]
 
 [test_screenshot.py]
 [test_cookies.py]
 [test_title.py]
 [test_title_chrome.py]
 skip-if = appname == 'fennec'