bug 1492499: marionette: drop broken window maximization test; r=automatedtester

This test is duplicated by WPT tests.

Depends on D10568

Differential Revision: https://phabricator.services.mozilla.com/D10569

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Tolfsen 2018-11-08 13:11:38 +00:00
Родитель d67daa8b34
Коммит fdddd29e71
1 изменённых файлов: 1 добавлений и 51 удалений

Просмотреть файл

@ -30,55 +30,5 @@ class TestWindowMaximize(MarionetteTestCase):
self.marionette.set_window_rect(
width=self.original_size["width"], height=self.original_size["height"])
def assert_window_maximized(self, actual, delta=None):
if self.marionette.session_capabilities["platformName"] == "windows":
delta = 16
else:
delta = 22
self.assertGreaterEqual(
actual["width"], self.max["width"] - delta,
msg="Window width is not within {delta} px of availWidth: "
"current width {current} should be greater than or equal to max width {max}"
.format(delta=delta, current=actual["width"], max=self.max["width"] - delta))
self.assertGreaterEqual(
actual["height"], self.max["height"] - delta,
msg="Window height is not within {delta} px of availHeight: "
"current height {current} should be greater than or equal to max height {max}"
.format(delta=delta, current=actual["height"], max=self.max["height"] - delta))
def assert_window_rect(self, rect):
self.assertIn("width", rect)
self.assertIn("height", rect)
self.assertIn("x", rect)
self.assertIn("y", rect)
self.assertIsInstance(rect["width"], int)
self.assertIsInstance(rect["height"], int)
self.assertIsInstance(rect["x"], int)
self.assertIsInstance(rect["y"], int)
def test_maximize(self):
maximize_resp = self.marionette.maximize_window()
self.assert_window_rect(maximize_resp)
window_rect_resp = self.marionette.window_rect
self.assertEqual(maximize_resp, window_rect_resp)
self.assert_window_maximized(maximize_resp)
def test_maximize_twice_is_idempotent(self):
maximized = self.marionette.maximize_window()
self.assert_window_maximized(maximized)
still_maximized = self.marionette.maximize_window()
self.assert_window_maximized(still_maximized)
def test_stress(self):
for i in range(1, 25):
expect_maximized = bool(i % 2)
if expect_maximized:
rect = self.marionette.maximize_window()
self.assert_window_maximized(rect)
else:
rect = self.marionette.set_window_rect(width=800, height=600)
self.assertEqual(800, rect["width"])
self.assertEqual(600, rect["height"])
self.marionette.maximize_window()