mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1027084 - Use about:blank as the initial tab for new windows in sessionstore tests r=smacleod
This commit is contained in:
parent
492476e6e9
commit
64de6a5ead
@ -226,7 +226,7 @@ function test() {
|
||||
// Open a new window
|
||||
// The previously closed window should be restored
|
||||
whenNewWindowLoaded({}, function (newWin) {
|
||||
is(newWin.gBrowser.browsers.length, TEST_URLS.length + 1,
|
||||
is(newWin.gBrowser.browsers.length, TEST_URLS.length + 2,
|
||||
"Restored window in-session with otherpopup windows around");
|
||||
|
||||
// Cleanup
|
||||
@ -259,7 +259,7 @@ function test() {
|
||||
|
||||
// Exit private browsing mode again
|
||||
whenNewWindowLoaded({}, function (newWin) {
|
||||
is(newWin.gBrowser.browsers.length, TEST_URLS.length + 1,
|
||||
is(newWin.gBrowser.browsers.length, TEST_URLS.length + 2,
|
||||
"Restored after leaving private browsing again");
|
||||
|
||||
newWin.close();
|
||||
@ -296,7 +296,7 @@ function test() {
|
||||
|
||||
// open a new window the previously closed window should be restored to
|
||||
whenNewWindowLoaded({}, function (newWin) {
|
||||
is(newWin.gBrowser.browsers.length, TEST_URLS.length + 1,
|
||||
is(newWin.gBrowser.browsers.length, TEST_URLS.length + 2,
|
||||
"Restored window and associated tabs in session");
|
||||
|
||||
// Cleanup
|
||||
|
@ -73,7 +73,7 @@ function provideWindow(aCallback, aURL, aFeatures) {
|
||||
});
|
||||
}
|
||||
|
||||
let win = openDialog(getBrowserURL(), "", aFeatures || "chrome,all,dialog=no", aURL);
|
||||
let win = openDialog(getBrowserURL(), "", aFeatures || "chrome,all,dialog=no", aURL || "about:blank");
|
||||
whenWindowLoaded(win, function onWindowLoaded(aWin) {
|
||||
if (!aURL) {
|
||||
info("Loaded a blank window.");
|
||||
@ -465,7 +465,15 @@ function closeAllButPrimaryWindow() {
|
||||
* expected (e.g. reading a big session state from disk).
|
||||
*/
|
||||
function whenNewWindowLoaded(aOptions, aCallback) {
|
||||
let win = OpenBrowserWindow(aOptions);
|
||||
let features = "";
|
||||
let url = "about:blank";
|
||||
|
||||
if (aOptions && aOptions.private || false) {
|
||||
features = ",private";
|
||||
url = "about:privatebrowsing";
|
||||
}
|
||||
|
||||
let win = openDialog(getBrowserURL(), "", "chrome,all,dialog=no" + features, url);
|
||||
whenDelayedStartupFinished(win, () => aCallback(win));
|
||||
return win;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user