mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1144253 - Enable test browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js r=Mossop
This commit is contained in:
parent
5c66993761
commit
fbd9117dee
@ -17,9 +17,6 @@ support-files =
|
||||
|
||||
[browser_privatebrowsing_DownloadLastDirWithCPS.js]
|
||||
[browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js]
|
||||
skip-if = true # Bug 1142678 - Loading a message sending frame script into a private about:home tab causes leaks
|
||||
[browser_privatebrowsing_aboutHomeButtonAfterWindowClose_old.js]
|
||||
skip-if = e10s
|
||||
[browser_privatebrowsing_aboutSessionRestore.js]
|
||||
[browser_privatebrowsing_cache.js]
|
||||
[browser_privatebrowsing_certexceptionsui.js]
|
||||
|
@ -1,50 +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/. */
|
||||
|
||||
// This test checks that the Session Restore about:home button
|
||||
// is disabled in private mode
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
function testNoSessionRestoreButton() {
|
||||
let win = OpenBrowserWindow({private: true});
|
||||
win.addEventListener("load", function onLoad() {
|
||||
win.removeEventListener("load", onLoad, false);
|
||||
executeSoon(function() {
|
||||
info("The second private window got loaded");
|
||||
let newTab = win.gBrowser.addTab();
|
||||
win.gBrowser.selectedTab = newTab;
|
||||
let tabBrowser = win.gBrowser.getBrowserForTab(newTab);
|
||||
tabBrowser.addEventListener("load", function tabLoadListener() {
|
||||
if (win.content.location != "about:home") {
|
||||
win.content.location = "about:home";
|
||||
return;
|
||||
}
|
||||
tabBrowser.removeEventListener("load", tabLoadListener, true);
|
||||
executeSoon(function() {
|
||||
info("about:home got loaded");
|
||||
let sessionRestoreButton = win.gBrowser
|
||||
.contentDocument
|
||||
.getElementById("restorePreviousSession");
|
||||
is(win.getComputedStyle(sessionRestoreButton).display,
|
||||
"none", "The Session Restore about:home button should be disabled");
|
||||
win.close();
|
||||
finish();
|
||||
});
|
||||
}, true);
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
|
||||
let win = OpenBrowserWindow({private: true});
|
||||
win.addEventListener("load", function onload() {
|
||||
win.removeEventListener("load", onload, false);
|
||||
executeSoon(function() {
|
||||
info("The first private window got loaded");
|
||||
win.close();
|
||||
testNoSessionRestoreButton();
|
||||
});
|
||||
}, false);
|
||||
}
|
Loading…
Reference in New Issue
Block a user