summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js')
-rw-r--r--browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js56
1 files changed, 0 insertions, 56 deletions
diff --git a/browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js b/browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js
deleted file mode 100644
index b330bec13..000000000
--- a/browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * These tests ensure that all changes made to the new tab page in private
- * browsing mode are discarded after switching back to normal mode again.
- * The private browsing mode should start with the current grid shown in normal
- * mode.
- */
-
-add_task(function* () {
- // prepare the grid
- yield testOnWindow(undefined);
- yield setLinks("0,1,2,3,4,5,6,7,8,9");
-
- yield* addNewTabPageTab();
- yield pinCell(0);
- yield* checkGrid("0p,1,2,3,4,5,6,7,8");
-
- // open private window
- yield testOnWindow({private: true});
-
- yield* addNewTabPageTab();
- yield* checkGrid("0p,1,2,3,4,5,6,7,8");
-
- // modify the grid while we're in pb mode
- yield blockCell(1);
- yield* checkGrid("0p,2,3,4,5,6,7,8");
-
- yield unpinCell(0);
- yield* checkGrid("0,2,3,4,5,6,7,8");
-
- // open normal window
- yield testOnWindow(undefined);
-
- // check that the grid is the same as before entering pb mode
- yield* addNewTabPageTab();
- yield* checkGrid("0,2,3,4,5,6,7,8")
-});
-
-var windowsToClose = [];
-function* testOnWindow(options) {
- let newWindowPromise = BrowserTestUtils.waitForNewWindow();
- var win = OpenBrowserWindow(options);
- windowsToClose.push(win);
- gWindow = win;
- yield newWindowPromise;
-}
-
-registerCleanupFunction(function () {
- gWindow = window;
- windowsToClose.forEach(function(win) {
- win.close();
- });
-});
-