Bug 1946389 - Set initial coordinates in WindowManager mochitests. r=webdriver-reviewers,whimboo,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D238636
This commit is contained in:
@@ -22,10 +22,5 @@ support-files = [
|
||||
|
||||
["browser_WindowManager.js"]
|
||||
skip-if = [
|
||||
"display == 'wayland'", # Bug 1923833: Window restoring doesn't work after the window was minimized on Wayland
|
||||
"os == 'win' && debug", # Bug 1946389: Window state initializes in maximized state instead of normal state on Windows
|
||||
"os == 'linux' && os_version == '18.04' && processor == 'x86_64'", # Bug 1946389
|
||||
"os == 'mac' && os_version == '14.70' && processor == 'x86_64'", # Bug 1946389
|
||||
"os == 'win' && os_version == '11.26100' && asan", # Bug 1946389
|
||||
"os == 'win' && os_version == '11.26100' && opt", # Bug 1946389
|
||||
"display == 'wayland'", # Bug 1923833: Window restoring doesn't work after the window was minimized on Wayland
|
||||
]
|
||||
|
||||
@@ -133,6 +133,10 @@ add_task(async function test_minimizeWindow() {
|
||||
const testWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
|
||||
try {
|
||||
await windowManager.adjustWindowGeometry(testWin, 100, 100, 800, 600);
|
||||
is(testWin.outerWidth, 800, "Window width is set to initial value");
|
||||
is(testWin.outerHeight, 600, "Window height is set to initial value");
|
||||
|
||||
is(
|
||||
WindowState.from(testWin.windowState),
|
||||
WindowState.Normal,
|
||||
@@ -162,6 +166,10 @@ add_task(async function test_maximizeWindow() {
|
||||
const testWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
|
||||
try {
|
||||
await windowManager.adjustWindowGeometry(testWin, 100, 100, 800, 600);
|
||||
is(testWin.outerWidth, 800, "Window width is set to initial value");
|
||||
is(testWin.outerHeight, 600, "Window height is set to initial value");
|
||||
|
||||
is(
|
||||
WindowState.from(testWin.windowState),
|
||||
WindowState.Normal,
|
||||
@@ -219,6 +227,9 @@ add_task(async function test_setFullscreen() {
|
||||
const testWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
|
||||
try {
|
||||
await windowManager.adjustWindowGeometry(testWin, 100, 100, 800, 600);
|
||||
is(testWin.outerWidth, 800, "Window width is set to initial value");
|
||||
is(testWin.outerHeight, 600, "Window height is set to initial value");
|
||||
is(
|
||||
WindowState.from(testWin.windowState),
|
||||
WindowState.Normal,
|
||||
|
||||
Reference in New Issue
Block a user