summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
commitfc61780b35af913801d72086456f493f63197da6 (patch)
treef85891288a7bd988da9f0f15ae64e5c63f00d493 /toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js
parent69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff)
parent50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff)
downloadUXP-fc61780b35af913801d72086456f493f63197da6.tar
UXP-fc61780b35af913801d72086456f493f63197da6.tar.gz
UXP-fc61780b35af913801d72086456f493f63197da6.tar.lz
UXP-fc61780b35af913801d72086456f493f63197da6.tar.xz
UXP-fc61780b35af913801d72086456f493f63197da6.zip
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts: # browser/app/profile/firefox.js # browser/components/preferences/jar.mn
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js')
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js64
1 files changed, 0 insertions, 64 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js b/toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js
deleted file mode 100644
index 761daf4eb..000000000
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Tests whether
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-
-Cu.import("resource://testing-common/httpd.js");
-
-var gTestserver = new HttpServer();
-gTestserver.start(-1);
-gPort = gTestserver.identity.primaryPort;
-mapFile("/data/test_bug619730.xml", gTestserver);
-
-function load_blocklist(file, aCallback) {
- Services.obs.addObserver(function() {
- Services.obs.removeObserver(arguments.callee, "blocklist-updated");
-
- do_execute_soon(aCallback);
- }, "blocklist-updated", false);
-
- Services.prefs.setCharPref("extensions.blocklist.url", "http://localhost:" +
- gPort + "/data/" + file);
- var blocklist = Cc["@mozilla.org/extensions/blocklist;1"].
- getService(Ci.nsITimerCallback);
- blocklist.notify(null);
-}
-
-var gSawGFX = false;
-var gSawTest = false;
-
-// Performs the initial setup
-function run_test() {
- createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
- startupManager();
-
- do_test_pending();
-
- Services.obs.addObserver(function(aSubject, aTopic, aData) {
- do_check_true(aSubject instanceof AM_Ci.nsIDOMElement);
- do_check_eq(aSubject.getAttribute("testattr"), "GFX");
- do_check_eq(aSubject.childNodes.length, 2);
- gSawGFX = true;
- }, "blocklist-data-gfxItems", false);
-
- Services.obs.addObserver(function(aSubject, aTopic, aData) {
- do_check_true(aSubject instanceof AM_Ci.nsIDOMElement);
- do_check_eq(aSubject.getAttribute("testattr"), "FOO");
- do_check_eq(aSubject.childNodes.length, 3);
- gSawTest = true;
- }, "blocklist-data-testItems", false);
-
- Services.obs.addObserver(function(aSubject, aTopic, aData) {
- do_check_true(gSawGFX);
- do_check_true(gSawTest);
- }, "blocklist-data-fooItems", false);
-
- // Need to wait for the blocklist to load; Bad Things happen if the test harness
- // shuts down AddonManager before the blocklist service is done telling it about
- // changes
- load_blocklist("test_bug619730.xml", () => gTestserver.stop(do_test_finished));
-}