Bug 1449255: Part 18 - Remove test_bug619730, which is covered by other tests. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Tue, 27 Mar 2018 16:29:15 -0700
changeset 773487 3797089c8d7f828c946df3a4e7692df16e70ff1b
parent 773486 1f975b617b0b48ec26b914424baeb0a7454648b8
child 773488 8a3f3f8ed65de5f280c3606417fb44740a16d909
push id104243
push usermaglione.k@gmail.com
push dateWed, 28 Mar 2018 00:15:32 +0000
reviewersaswan
bugs1449255, 619730
milestone61.0a1
Bug 1449255: Part 18 - Remove test_bug619730, which is covered by other tests. r?aswan MozReview-Commit-ID: 3dgdK7mk5Kk
toolkit/mozapps/extensions/test/xpcshell/data/test_bug619730.xml
toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug619730.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
-  <gfxItems testattr="GFX"><gfxItem/><gfxItem/></gfxItems>
-  <testItems testattr="FOO"><testItem/><testItem/><testItem/></testItems>
-  <fooItems/>
-</blocklist>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug619730.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-var gTestserver = AddonTestUtils.createHttpServer({hosts: ["example.com"]});
-gTestserver.registerDirectory("/data/", do_get_file("data"));
-
-function load_blocklist(file, aCallback) {
-  Services.obs.addObserver(function observer() {
-    Services.obs.removeObserver(observer, "blocklist-updated");
-
-    executeSoon(aCallback);
-  }, "blocklist-updated");
-
-  Services.prefs.setCharPref("extensions.blocklist.url", "http://example.com/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) {
-    Assert.ok(aSubject instanceof Ci.nsIDOMElement);
-    Assert.equal(aSubject.getAttribute("testattr"), "GFX");
-    Assert.equal(aSubject.childNodes.length, 2);
-    gSawGFX = true;
-  }, "blocklist-data-gfxItems");
-
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    Assert.ok(aSubject instanceof Ci.nsIDOMElement);
-    Assert.equal(aSubject.getAttribute("testattr"), "FOO");
-    Assert.equal(aSubject.childNodes.length, 3);
-    gSawTest = true;
-  }, "blocklist-data-testItems");
-
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    Assert.ok(gSawGFX);
-    Assert.ok(gSawTest);
-  }, "blocklist-data-fooItems");
-
-  // 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", () => do_test_finished());
-}
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -85,18 +85,16 @@ tags = blocklist
 [test_bug570173.js]
 [test_bug587088.js]
 skip-if = os == "win" # Bug 1358846
 [test_bug595081.js]
 [test_bug596607.js]
 [test_bug616841.js]
 # Bug 676992: test consistently fails on Android
 fail-if = os == "android"
-[test_bug619730.js]
-tags = blocklist
 [test_cache_certdb.js]
 run-if = addon_signing
 [test_cacheflush.js]
 [test_childprocess.js]
 [test_compatoverrides.js]
 [test_corrupt.js]
 [test_corruptfile.js]
 [test_crash_annotation_quoting.js]