mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
25 lines
1004 B
JavaScript
25 lines
1004 B
JavaScript
// Make sure that we can open private browsing windows
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
var nonPrivateWin = OpenBrowserWindow();
|
|
ok(!PrivateBrowsingUtils.isWindowPrivate(nonPrivateWin), "OpenBrowserWindow() should open a normal window");
|
|
nonPrivateWin.close();
|
|
|
|
var privateWin = OpenBrowserWindow({private: true});
|
|
ok(PrivateBrowsingUtils.isWindowPrivate(privateWin), "OpenBrowserWindow({private: true}) should open a private window");
|
|
|
|
nonPrivateWin = OpenBrowserWindow({private: false});
|
|
ok(!PrivateBrowsingUtils.isWindowPrivate(nonPrivateWin), "OpenBrowserWindow({private: false}) should open a normal window");
|
|
nonPrivateWin.close();
|
|
|
|
whenDelayedStartupFinished(privateWin, function() {
|
|
nonPrivateWin = privateWin.OpenBrowserWindow({private: false});
|
|
ok(!PrivateBrowsingUtils.isWindowPrivate(nonPrivateWin), "privateWin.OpenBrowserWindow({private: false}) should open a normal window");
|
|
nonPrivateWin.close();
|
|
privateWin.close();
|
|
finish();
|
|
});
|
|
}
|
|
|