Bug 1364213: Add Test for Set Window Rect for setting to available dimensions; r?whimboo draft
authorDavid Burns <dburns@mozilla.com>
Thu, 11 May 2017 22:28:41 +0100
changeset 576567 c9d3561ad5e31f72fe14abcb6b610b0bd58e82cb
parent 576307 84a52fd860629ab6c8b148316fa10b40a0d05e6f
child 628243 fe745b1afa77f05ab0a781e716683973ec528687
push id58412
push userbmo:dburns@mozilla.com
push dateThu, 11 May 2017 21:29:07 +0000
reviewerswhimboo
bugs1364213
milestone55.0a1
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"])