Bug 1042135 - Update Directory Links Provider to use only the dnt.enabled pref after removing the dnt.value pref. (r=adw)

--HG--
extra : rebase_source : 350e99d270e18f497f69a77672557a18ac66ef6d
This commit is contained in:
Sid Stamm 2014-10-21 16:55:36 -07:00
parent 6fc4058278
commit a0eb4bde4d
2 changed files with 2 additions and 8 deletions

View File

@ -137,8 +137,7 @@ let DirectoryLinksProvider = {
let enhanced = true;
try {
// Default to not enhanced if DNT is set to tell websites to not track
if (Services.prefs.getBoolPref("privacy.donottrackheader.enabled") &&
Services.prefs.getIntPref("privacy.donottrackheader.value") == 1) {
if (Services.prefs.getBoolPref("privacy.donottrackheader.enabled")) {
enhanced = false;
}
}

View File

@ -614,19 +614,14 @@ add_task(function test_DirectoryLinksProvider_setDefaultEnhanced() {
do_check_eq(Services.prefs.getBoolPref(kNewtabEnhancedPref), expected);
}
// Use the default donottrack prefs (enabled = false, value = 1)
// Use the default donottrack prefs (enabled = false)
Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
Services.prefs.clearUserPref("privacy.donottrackheader.value");
checkDefault(true);
// Turn on DNT - no track
Services.prefs.setBoolPref("privacy.donottrackheader.enabled", true);
checkDefault(false);
// Set DNT - do track
Services.prefs.setIntPref("privacy.donottrackheader.value", 0);
checkDefault(true);
// Turn off DNT header
Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
checkDefault(true);