зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1276271 P2 Verify responsive design UI does not leak when window is closed. r=jryans
This commit is contained in:
Родитель
64760e8d52
Коммит
d9b5c79aac
|
@ -17,3 +17,4 @@ skip-if = e10s && debug # Bug 1252201 - Docshell leak on debug e10s
|
|||
[browser_responsiveuiaddcustompreset.js]
|
||||
[browser_responsive_devicewidth.js]
|
||||
[browser_responsiveui_customuseragent.js]
|
||||
[browser_responsiveui_window_close.js]
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(function* () {
|
||||
let newWindowPromise = BrowserTestUtils.waitForNewWindow();
|
||||
window.open("about:blank", "_blank");
|
||||
let newWindow = yield newWindowPromise;
|
||||
|
||||
newWindow.focus();
|
||||
yield once(newWindow.gBrowser, "load", true);
|
||||
|
||||
let tab = newWindow.gBrowser.selectedTab;
|
||||
yield ResponsiveUIManager.runIfNeeded(newWindow, tab);
|
||||
|
||||
// Close the window on a tab with an active responsive design UI and
|
||||
// wait for the UI to gracefully shutdown. This has leaked the window
|
||||
// in the past.
|
||||
ok(ResponsiveUIManager.isActiveForTab(tab),
|
||||
"ResponsiveUI should be active for tab when the window is closed");
|
||||
let offPromise = once(ResponsiveUIManager, "off");
|
||||
yield BrowserTestUtils.closeWindow(newWindow);
|
||||
yield offPromise;
|
||||
});
|
Загрузка…
Ссылка в новой задаче