Bug 1517587 - [marionette] Get/Set Window Rect should not return window state. r=ato

As decided during the last TPAC meeting the window rect commands
should not return the window state.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Henrik Skupin 2019-01-04 13:51:24 +00:00
parent 2545cf7d92
commit 3d3e53485f
3 changed files with 0 additions and 41 deletions

View File

@ -259,7 +259,6 @@ browser.Context = class {
y: this.window.screenY,
width: this.window.outerWidth,
height: this.window.outerHeight,
state: WindowState.from(this.window.windowState),
};
}

View File

@ -1,38 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
from marionette_driver.errors import InvalidArgumentException
from marionette_harness import MarionetteTestCase
class TestWindowMinimize(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
self.original_size = self.marionette.window_rect
def is_minimized(self):
return self.marionette.execute_script("return document.hidden", sandbox=None)
def assert_window_minimized(self, resp):
self.assertEqual("minimized", resp["state"])
def assert_window_restored(self, actual):
self.assertEqual("normal", actual["state"])
def test_minimize_twice_is_idempotent(self):
self.assert_window_minimized(self.marionette.minimize_window())
self.assert_window_minimized(self.marionette.minimize_window())
def test_minimize_stress(self):
for i in range(1, 25):
if self.is_minimized:
resp = self.marionette.set_window_rect(width=800, height=600)
self.assert_window_restored(resp)
else:
resp = self.marionette.minimize_window()
self.assert_window_minimized(resp)

View File

@ -68,8 +68,6 @@ skip-if = appname == 'fennec'
skip-if = appname == 'fennec'
[test_window_maximize.py]
skip-if = appname == 'fennec'
[test_window_minimize.py]
skip-if = appname == 'fennec' || headless
[test_window_status_content.py]
[test_window_status_chrome.py]