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
This commit is contained in:
Andreas Tolfsen 2017-08-01 18:19:34 +01:00
Родитель 6e4c649956
Коммит acef2ddd2d
1 изменённых файлов: 5 добавлений и 5 удалений

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

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