mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
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:
parent
2545cf7d92
commit
3d3e53485f
@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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)
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user