Bug 1364213: Add Test for Set Window Rect for setting to available dimensions; r=whimboo
authorDavid Burns <dburns@mozilla.com>
Thu, 11 May 2017 22:28:41 +0100
changeset 358110 79c92ef1061b290ec61b3907cb719930a07352a6
parent 358109 b4c5608335b6130ab97fc5bdcfda6cea4f5ab415
child 358111 ada4d29af82660cf824a66955245e6dc57ac231c
push id31818
push userarchaeopteryx@coole-files.de
push dateSun, 14 May 2017 16:01:21 +0000
treeherdermozilla-central@3a801856dea9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1364213
milestone55.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 1364213: Add Test for Set Window Rect for setting to available dimensions; r=whimboo This adds a test to set the window size to that of the available height and width. This was an issue before. See https://github.com/mozilla/geckodriver/issues/153 MozReview-Commit-ID: J7H8WIYiB5l
testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py
@@ -179,8 +179,14 @@ class TestSize(MarionetteTestCase):
     def test_resize_larger_than_screen(self):
         self.marionette.set_window_size(
             self.max["width"] * 2, self.max["height"] * 2)
         new = self.marionette.window_size
 
         # in X the window size may be greater than the bounds of the screen
         self.assertGreaterEqual(new["width"], self.max["width"])
         self.assertGreaterEqual(new["height"], self.max["height"])
+
+    def test_resize_to_available_screen_size(self):
+        result = self.marionette.set_window_rect(width=self.max['width'],
+                                                 height=self.max["height"])
+        self.assertEqual(result["width"], self.max["width"])
+        self.assertEqual(result["height"], self.max["height"])