Backed out changeset 1f465582eb8c (bug 1517587) for causing build bustages on gfx/angle/targets/angle_common/moz.build. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Fri, 04 Jan 2019 15:41:42 +0200
changeset 509648 6ff27f273550168fa5dab4b1fd78813a259820c8
parent 509647 1f465582eb8c486fc9b2ba3cc140eafa9df9d1f9
child 509649 13be012a1bae66047edf1e12ad371ff2e7f81712
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)
bugs1517587
milestone66.0a1
backs out1f465582eb8c486fc9b2ba3cc140eafa9df9d1f9
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
Backed out changeset 1f465582eb8c (bug 1517587) for causing build bustages on gfx/angle/targets/angle_common/moz.build. CLOSED TREE
testing/marionette/browser.js
testing/marionette/harness/marionette_harness/tests/unit/test_window_minimize.py
--- a/testing/marionette/browser.js
+++ b/testing/marionette/browser.js
@@ -254,16 +254,17 @@ 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() {
new file mode 100644
--- /dev/null
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_window_minimize.py
@@ -0,0 +1,38 @@
+# 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)