зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1175606 - Enable Tracking Protection by default in Private Browsing Mode;r=ttaubert
--HG-- extra : commitid : IM75vVo386o
This commit is contained in:
Родитель
1555baed19
Коммит
3489041d98
|
@ -60,18 +60,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
|
||||
// Update state that depends on preferences.
|
||||
prefObserver.observe();
|
||||
|
||||
// This check can be removed when Tracking Protection is always available.
|
||||
let tpUIEnabled = false;
|
||||
try {
|
||||
tpUIEnabled = Services.prefs.getBoolPref("privacy.trackingprotection.ui.enabled");
|
||||
} catch (ex) {
|
||||
// The preference is not available.
|
||||
}
|
||||
if (!tpUIEnabled) {
|
||||
document.getElementById("trackingProtectionSection")
|
||||
.setAttribute("hidden", "true");
|
||||
}
|
||||
}, false);
|
||||
|
||||
function openPrivateWindow() {
|
||||
|
|
|
@ -17,6 +17,7 @@ support-files =
|
|||
|
||||
[browser_privatebrowsing_DownloadLastDirWithCPS.js]
|
||||
[browser_privatebrowsing_about.js]
|
||||
tags = trackingprotection
|
||||
[browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js]
|
||||
[browser_privatebrowsing_aboutSessionRestore.js]
|
||||
[browser_privatebrowsing_cache.js]
|
||||
|
|
|
@ -46,14 +46,12 @@ function* testLinkOpensUrl({ win, tab, elementId, expectedUrl }) {
|
|||
*/
|
||||
add_task(function* test_links() {
|
||||
// Use full version and change the remote URLs to prevent network access.
|
||||
Services.prefs.setBoolPref("privacy.trackingprotection.ui.enabled", true);
|
||||
Services.prefs.setCharPref("app.support.baseURL", "https://example.com/");
|
||||
Services.prefs.setCharPref("privacy.trackingprotection.introURL",
|
||||
"https://example.com/tour");
|
||||
registerCleanupFunction(function () {
|
||||
Services.prefs.clearUserPref("privacy.trackingprotection.introURL");
|
||||
Services.prefs.clearUserPref("app.support.baseURL");
|
||||
Services.prefs.clearUserPref("privacy.trackingprotection.ui.enabled");
|
||||
});
|
||||
|
||||
let { win, tab } = yield openAboutPrivateBrowsing();
|
||||
|
@ -77,12 +75,10 @@ add_task(function* test_links() {
|
|||
*/
|
||||
add_task(function* test_toggleTrackingProtection() {
|
||||
// Use tour version but disable Tracking Protection.
|
||||
Services.prefs.setBoolPref("privacy.trackingprotection.ui.enabled", true);
|
||||
Services.prefs.setBoolPref("privacy.trackingprotection.pbmode.enabled",
|
||||
true);
|
||||
registerCleanupFunction(function () {
|
||||
Services.prefs.clearUserPref("privacy.trackingprotection.pbmode.enabled");
|
||||
Services.prefs.clearUserPref("privacy.trackingprotection.ui.enabled");
|
||||
});
|
||||
|
||||
let { win, tab } = yield openAboutPrivateBrowsing();
|
||||
|
|
|
@ -1087,7 +1087,7 @@ pref("privacy.donottrackheader.enabled", false);
|
|||
// Enforce tracking protection in all modes
|
||||
pref("privacy.trackingprotection.enabled", false);
|
||||
// Enforce tracking protection in Private Browsing mode
|
||||
pref("privacy.trackingprotection.pbmode.enabled", false);
|
||||
pref("privacy.trackingprotection.pbmode.enabled", true);
|
||||
|
||||
pref("dom.event.contextmenu.enabled", true);
|
||||
pref("dom.event.clipboardevents.enabled", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче