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
--- 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"])