mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Simplify browser_privatebrowsing_lastpbcontextexited.js and make it not leak, no bug
DONTBUILD since this is NPOTB for global PB builds --HG-- extra : rebase_source : 6b2c4a18d04c09f707d6724f16b00c8f2e8ce1ff
This commit is contained in:
parent
57109bc72d
commit
a33baa347e
@ -5,7 +5,7 @@
|
||||
function test() {
|
||||
// We need to open a new window for this so that its docshell would get destroyed
|
||||
// when clearing the PB mode flag.
|
||||
let newWin = window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
|
||||
let newWin = OpenBrowserWindow({private: true});
|
||||
waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(function() {
|
||||
let expected = false;
|
||||
@ -14,12 +14,10 @@ function test() {
|
||||
is(aTopic, "last-pb-context-exited", "Correct topic should be dispatched");
|
||||
is(expected, true, "notification not expected yet");
|
||||
Services.obs.removeObserver(observer, "last-pb-context-exited", false);
|
||||
gPrefService.clearUserPref("browser.privatebrowsing.keep_current_session");
|
||||
finish();
|
||||
}
|
||||
};
|
||||
Services.obs.addObserver(observer, "last-pb-context-exited", false);
|
||||
setPrivateWindow(newWin, true);
|
||||
expected = true;
|
||||
newWin.close(); // this will cause the docshells to leave PB mode
|
||||
newWin = null;
|
||||
|
Loading…
Reference in New Issue
Block a user