commit 4fd7f4e3c1226049e4815d1cc01a5a99a473c121 Author: Mark Hammond mhammond@skippinet.com.au 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...."; + setAndUpdateBlocklist(noBlockedURL, function() { + Services.prefs.setCharPref("extensions.blocklist.url", _originalTestBlocklistURL); + if (aCallback) + aCallback(); + }); }
function setManifestPref(name, manifest) {
tbb-commits@lists.torproject.org