mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1014323 - Do not add about:privatebrowsing to recently closed tabs r=ttaubert
This commit is contained in:
parent
1dc6e00ac8
commit
1eac04358e
@ -3078,7 +3078,8 @@ let SessionStoreInternal = {
|
||||
return aTabState.entries.length &&
|
||||
!(aTabState.entries.length == 1 &&
|
||||
(aTabState.entries[0].url == "about:blank" ||
|
||||
aTabState.entries[0].url == "about:newtab") &&
|
||||
aTabState.entries[0].url == "about:newtab" ||
|
||||
aTabState.entries[0].url == "about:privatebrowsing") &&
|
||||
!aTabState.userTypedValue);
|
||||
},
|
||||
|
||||
|
@ -57,6 +57,7 @@ support-files =
|
||||
#disabled-for-intermittent-failures--bug-766044, browser_459906_sample.html
|
||||
#disabled-for-intermittent-failures--bug-765389, browser_461743_sample.html
|
||||
|
||||
[browser_aboutPrivateBrowsing.js]
|
||||
[browser_aboutSessionRestore.js]
|
||||
[browser_attributes.js]
|
||||
[browser_broadcast.js]
|
||||
|
@ -0,0 +1,25 @@
|
||||
/* 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/. */
|
||||
|
||||
// Tests that an about:privatebrowsing tab with no history will not
|
||||
// be saved into session store and thus, it will not show up in
|
||||
// Recently Closed Tabs.
|
||||
|
||||
add_task(function* () {
|
||||
while (ss.getClosedTabCount(window)) {
|
||||
ss.forgetClosedTab(window, 0);
|
||||
}
|
||||
|
||||
is(ss.getClosedTabCount(window), 0, "should be no closed tabs");
|
||||
|
||||
let tab = gBrowser.addTab("about:privatebrowsing");
|
||||
let browser = tab.linkedBrowser;
|
||||
yield promiseBrowserLoaded(browser);
|
||||
|
||||
is(gBrowser.browsers[1].currentURI.spec, "about:privatebrowsing",
|
||||
"we will be removing an about:privatebrowsing tab");
|
||||
|
||||
gBrowser.removeTab(tab);
|
||||
is(ss.getClosedTabCount(window), 0, "should still be no closed tabs");
|
||||
});
|
Loading…
Reference in New Issue
Block a user