From acef2ddd2d0cc0f70d7061ceb9ad4091e4272e49 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Tue, 1 Aug 2017 18:19:34 +0100 Subject: [PATCH] Bug 1381876 - Fix window maximised assertions. r=automatedtester The "delta" in the second assertion was not deducted from the height. The patch also improves the error message. MozReview-Commit-ID: 8u8UhKg3Q62 --HG-- extra : rebase_source : a3771620fc15225ac6932c718515b8dfcf2fdab0 --- .../tests/unit/test_window_maximize.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py b/testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py index c5775aafcb2f..e20946ef8733 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py @@ -39,13 +39,13 @@ class TestWindowMaximize(MarionetteTestCase): self.assertGreaterEqual( actual["width"], self.max["width"] - delta, msg="Window width is not within {delta} px of availWidth: " - "current width {expected} should be greater than max width {max}" - .format(delta=delta, expected=actual["width"], max=self.max["width"] - delta)) + "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"], + actual["height"], self.max["height"] - delta, msg="Window height is not within {delta} px of availHeight: " - "current height {expected} should be greater than max width {max}" - .format(delta=delta, expected=actual["height"], max=self.max["height"] - delta)) + "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_restored(self, actual): self.assertEqual(self.original_size["width"], actual["width"])