summaryrefslogtreecommitdiffstats
path: root/toolkit/components/satchel/test/browser
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:55:19 +0200
commiteb70e6e3d0bff11c25f14b1196025791bf2308fb (patch)
tree5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/components/satchel/test/browser
parent32ead795290b3399d56b4708fc75b77d296f6a1a (diff)
downloadUXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/satchel/test/browser')
-rw-r--r--toolkit/components/satchel/test/browser/.eslintrc.js7
-rw-r--r--toolkit/components/satchel/test/browser/browser.ini5
-rw-r--r--toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js63
3 files changed, 0 insertions, 75 deletions
diff --git a/toolkit/components/satchel/test/browser/.eslintrc.js b/toolkit/components/satchel/test/browser/.eslintrc.js
deleted file mode 100644
index 7c8021192..000000000
--- a/toolkit/components/satchel/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/satchel/test/browser/browser.ini b/toolkit/components/satchel/test/browser/browser.ini
deleted file mode 100644
index 6a3fc452e..000000000
--- a/toolkit/components/satchel/test/browser/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-support-files =
- !/toolkit/components/satchel/test/subtst_privbrowsing.html
-
-[browser_privbrowsing_perwindowpb.js]
diff --git a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js b/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
deleted file mode 100644
index 982480648..000000000
--- a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* 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/. */
-
-var FormHistory = (Components.utils.import("resource://gre/modules/FormHistory.jsm", {})).FormHistory;
-
-/** Test for Bug 472396 **/
-add_task(function* test() {
- // initialization
- let windowsToClose = [];
- let testURI =
- "http://example.com/tests/toolkit/components/satchel/test/subtst_privbrowsing.html";
-
- function* doTest(aShouldValueExist, aWindow) {
- let browser = aWindow.gBrowser.selectedBrowser;
- BrowserTestUtils.loadURI(browser, testURI);
- yield BrowserTestUtils.browserLoaded(browser);
-
- // Wait for the page to reload itself.
- yield BrowserTestUtils.browserLoaded(browser);
-
- let count = 0;
- let doneCounting = {};
- doneCounting.promise = new Promise(resolve => doneCounting.resolve = resolve);
- FormHistory.count({ fieldname: "field", value: "value" },
- {
- handleResult(result) {
- count = result;
- },
- handleError(error) {
- do_throw("Error occurred searching form history: " + error);
- },
- handleCompletion(num) {
- if (aShouldValueExist) {
- is(count, 1, "In non-PB mode, we add a single entry");
- } else {
- is(count, 0, "In PB mode, we don't add any entries");
- }
-
- doneCounting.resolve();
- }
- });
- yield doneCounting.promise;
- }
-
- function testOnWindow(aOptions, aCallback) {
- return BrowserTestUtils.openNewBrowserWindow(aOptions)
- .then(win => { windowsToClose.push(win); return win; });
- }
-
-
- yield testOnWindow({private: true}).then((aWin) => {
- return Task.spawn(doTest(false, aWin));
- });
-
- // Test when not on private mode after visiting a site on private
- // mode. The form history should not exist.
- yield testOnWindow({}).then((aWin) => {
- return Task.spawn(doTest(true, aWin));
- });
-
- yield Promise.all(windowsToClose.map(win => BrowserTestUtils.closeWindow(win)));
-});