зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 40580eaf2289 (bug 1741597) for causing mochitest failures in browser_contentblocking_standard_tcp_toggle. CLOSED TREE
This commit is contained in:
Родитель
21ac7aece3
Коммит
2b5c232830
|
@ -68,22 +68,18 @@ function testTelemetryState(optIn) {
|
|||
// Tests that the dFPI rollout pref updates the default cookieBehavior to 5,
|
||||
// sets the correct search prefs and records telemetry.
|
||||
add_task(async function testdFPIRolloutPref() {
|
||||
// Keep track of the default cookie behavior value at the start of the test.
|
||||
// Depending on the release channel, this may be 4 (Beta + Release) or 5
|
||||
// (Nightly).
|
||||
let cookieBehaviorInitialDefault = defaultPrefs.getIntPref(
|
||||
COOKIE_BEHAVIOR_PREF
|
||||
defaultPrefs.setIntPref(
|
||||
COOKIE_BEHAVIOR_PREF,
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER
|
||||
);
|
||||
|
||||
// Test the unset state of the pref.
|
||||
testTelemetryState(null);
|
||||
|
||||
Services.prefs.setBoolPref(PREF_DFPI_ENABLED_BY_DEFAULT, false);
|
||||
// Setting the PREF_DFPI_ENABLED_BY_DEFAULT pref to false should always revert
|
||||
// to the initial default which can vary between the release channels.
|
||||
is(
|
||||
defaultPrefs.getIntPref(COOKIE_BEHAVIOR_PREF),
|
||||
cookieBehaviorInitialDefault
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER
|
||||
);
|
||||
testSearchPrefState(false);
|
||||
testTelemetryState(false);
|
||||
|
@ -99,7 +95,7 @@ add_task(async function testdFPIRolloutPref() {
|
|||
Services.prefs.setBoolPref(PREF_DFPI_ENABLED_BY_DEFAULT, false);
|
||||
is(
|
||||
defaultPrefs.getIntPref(COOKIE_BEHAVIOR_PREF),
|
||||
cookieBehaviorInitialDefault
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER
|
||||
);
|
||||
testSearchPrefState(false);
|
||||
testTelemetryState(false);
|
||||
|
|
|
@ -889,7 +889,6 @@ BrowserGlue.prototype = {
|
|||
_migrationImportsDefaultBookmarks: false,
|
||||
_placesBrowserInitComplete: false,
|
||||
_isNewProfile: undefined,
|
||||
_defaultCookieBehaviorAtStartup: null,
|
||||
|
||||
_setPrefToSaveSession: function BG__setPrefToSaveSession(aForce) {
|
||||
if (!this._saveSession && !aForce) {
|
||||
|
@ -1676,16 +1675,9 @@ BrowserGlue.prototype = {
|
|||
PlacesUtils.favicons.setDefaultIconURIPreferredSize(
|
||||
16 * aWindow.devicePixelRatio
|
||||
);
|
||||
|
||||
// Keep track of the initial default cookie behavior to revert to when
|
||||
// users opt-out. This is used by _setDefaultCookieBehavior.
|
||||
BrowserGlue._defaultCookieBehaviorAtStartup = Services.prefs
|
||||
.getDefaultBranch("")
|
||||
.getIntPref("network.cookie.cookieBehavior");
|
||||
// _setDefaultCookieBehavior needs to run before other functions that modify
|
||||
// privacy preferences such as _setPrefExpectationsAndUpdate and _matchCBCategory
|
||||
this._setDefaultCookieBehavior();
|
||||
|
||||
this._setPrefExpectationsAndUpdate();
|
||||
this._matchCBCategory();
|
||||
|
||||
|
@ -1761,7 +1753,7 @@ BrowserGlue.prototype = {
|
|||
"network.cookie.cookieBehavior",
|
||||
dFPIEnabled
|
||||
? Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN
|
||||
: BrowserGlue._defaultCookieBehaviorAtStartup
|
||||
: Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER
|
||||
);
|
||||
|
||||
Services.telemetry.scalarSet(
|
||||
|
|
Загрузка…
Ссылка в новой задаче