Backed out changeset 69c5cfd6e270 (bug 1081343) for bc1 test failures

This commit is contained in:
Carsten "Tomcat" Book 2014-10-23 16:17:24 +02:00
parent 29ad75d2bc
commit 7a99c09c0f
4 changed files with 0 additions and 85 deletions

View File

@ -1761,6 +1761,3 @@ pref("experiments.supported", true);
pref("media.gmp-gmpopenh264.provider.enabled", true);
pref("browser.apps.URL", "https://marketplace.firefox.com/discovery/");
pref("browser.polaris.enabled", false);
pref("privacy.trackingprotection.ui.enabled", false);

View File

@ -9,7 +9,6 @@ const Cr = Components.results;
const Cu = Components.utils;
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const POLARIS_ENABLED = "browser.polaris.enabled";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
@ -398,14 +397,6 @@ BrowserGlue.prototype = {
Services.obs.removeObserver(this, "browser-search-service");
this._syncSearchEngines();
break;
case "nsPref:changed":
if (data == POLARIS_ENABLED) {
let enabled = Services.prefs.getBoolPref(POLARIS_ENABLED);
Services.prefs.clearUserPref("privacy.donottrackheader.value");
Services.prefs.setBoolPref("privacy.donottrackheader.enabled", enabled);
Services.prefs.setBoolPref("privacy.trackingprotection.enabled", enabled);
Services.prefs.setBoolPref("privacy.trackingprotection.ui.enabled", enabled);
}
}
},
@ -452,9 +443,6 @@ BrowserGlue.prototype = {
#endif
os.addObserver(this, "browser-search-engine-modified", false);
os.addObserver(this, "browser-search-service", false);
#ifdef NIGHTLY_BUILD
Services.prefs.addObserver(POLARIS_ENABLED, this, false);
#endif
},
// cleanup (called on application shutdown)
@ -495,9 +483,6 @@ BrowserGlue.prototype = {
os.removeObserver(this, "browser-search-service");
// may have already been removed by the observer
} catch (ex) {}
#ifdef NIGHTLY_BUILD
Services.prefs.removeObserver(POLARIS_ENABLED, this);
#endif
},
_onAppDefaults: function BG__onAppDefaults() {

View File

@ -2,5 +2,3 @@
[browser_bug538331.js]
skip-if = e10s # Bug ?????? - child process crash, but only when run as part of the suite (ie, probably not actually this tests fault!?)
[browser_polaris_prefs.js]

View File

@ -1,65 +0,0 @@
const POLARIS_ENABLED = "browser.polaris.enabled";
const PREF_DNT = "privacy.donottrackheader.enabled";
const PREF_DNTV = "privacy.donottrackheader.value";
const PREF_TP = "privacy.trackingprotection.enabled";
const PREF_TPUI = "privacy.trackingprotection.ui.enabled";
let prefs = [PREF_DNT, PREF_TP, PREF_TPUI];
function spinEventLoop() {
return new Promise((resolve) => executeSoon(resolve));
};
// Spin event loop before checking so that polaris pref observer can set
// dependent prefs.
function* assertPref(pref, enabled) {
yield spinEventLoop();
let prefEnabled = Services.prefs.getBoolPref(pref);
Assert.equal(prefEnabled, enabled, "Checking state of pref " + pref + ".");
};
function* testPrefs(test) {
for (let pref of prefs) {
yield test(pref);
}
}
add_task(function* test_default_values() {
Assert.ok(!Services.prefs.getBoolPref(POLARIS_ENABLED), POLARIS_ENABLED + " is disabled by default.");
Assert.ok(!Services.prefs.getBoolPref(PREF_TPUI), PREF_TPUI + "is disabled by default.");
});
add_task(function* test_changing_pref_changes_tracking() {
function* testPref(pref) {
Services.prefs.setBoolPref(POLARIS_ENABLED, true);
yield assertPref(pref, true);
Services.prefs.setBoolPref(POLARIS_ENABLED, false);
yield assertPref(pref, false);
Services.prefs.setBoolPref(POLARIS_ENABLED, true);
yield assertPref(pref, true);
}
yield testPrefs(testPref);
});
add_task(function* test_prefs_can_be_changed_individually() {
function* testPref(pref) {
Services.prefs.setBoolPref(POLARIS_ENABLED, true);
yield assertPref(pref, true);
Services.prefs.setBoolPref(pref, false);
yield assertPref(pref, false);
yield assertPref(POLARIS_ENABLED, true);
Services.prefs.setBoolPref(POLARIS_ENABLED, false);
yield assertPref(pref, false);
Services.prefs.setBoolPref(pref, true);
yield assertPref(pref, true);
yield assertPref(POLARIS_ENABLED, false);
}
yield testPrefs(testPref);
});
add_task(function* test_donottrackheader_having_0_value() {
Services.prefs.setIntPref(PREF_DNTV, 0);
Services.prefs.setBoolPref(POLARIS_ENABLED, true);
yield spinEventLoop();
Assert.ok(Services.prefs.getIntPref(PREF_DNTV, true), 1, PREF_DNTV + " reset after setting polaris.");
});