[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/esr24] Bug 850721 - Fix social blocklist oranges by not enabling the default update server. r=mixedpuppy, a=test-only



commit 4fd7f4e3c1226049e4815d1cc01a5a99a473c121
Author: Mark Hammond <mhammond@xxxxxxxxxxxxxxxx>
Date:   Fri Feb 7 12:07:04 2014 +1100

    Bug 850721 - Fix social blocklist oranges by not enabling the default update server. r=mixedpuppy, a=test-only
---
 browser/base/content/test/social/head.js |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/browser/base/content/test/social/head.js b/browser/base/content/test/social/head.js
index 1e5d841..5b77729 100644
--- a/browser/base/content/test/social/head.js
+++ b/browser/base/content/test/social/head.js
@@ -252,14 +252,24 @@ function updateBlocklist(aCallback) {
   blocklistNotifier.notify(null);
 }
 
+var _originalTestBlocklistURL = null;
 function setAndUpdateBlocklist(aURL, aCallback) {
+  if (!_originalTestBlocklistURL)
+    _originalTestBlocklistURL = Services.prefs.getCharPref("extensions.blocklist.url");
   Services.prefs.setCharPref("extensions.blocklist.url", aURL);
   updateBlocklist(aCallback);
 }
 
 function resetBlocklist(aCallback) {
-  Services.prefs.clearUserPref("extensions.blocklist.url");
-  updateBlocklist(aCallback);
+  // XXX - this has "forked" from the head.js helpers in our parent directory :(
+  // But let's reuse their blockNoPlugins.xml.  Later, we should arrange to
+  // use their head.js helpers directly
+  let noBlockedURL = "http://example.com/browser/browser/base/content/test/general/blockNoPlugins.xml";;
+  setAndUpdateBlocklist(noBlockedURL, function() {
+    Services.prefs.setCharPref("extensions.blocklist.url", _originalTestBlocklistURL);
+    if (aCallback)
+      aCallback();
+  });
 }
 
 function setManifestPref(name, manifest) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits