Bug 1296767 part 6 - Remove startOverKeepIdentity pref. r=markh

MozReview-Commit-ID: 7YDYTCRiKZa
This commit is contained in:
Edouard Oger 2017-01-18 16:30:38 -05:00
Родитель cdce850c10
Коммит ea99e4442d
10 изменённых файлов: 1 добавлений и 31 удалений

Просмотреть файл

@ -157,16 +157,3 @@ function uninstallFakePAC() {
_("Uninstalling fake PAC.");
MockRegistrar.unregister(fakePACCID);
}
// Many tests do service.startOver() and don't expect the provider type to
// change (whereas by default, a startOver will do exactly that so FxA is
// subsequently used). The tests that know how to deal with
// the Firefox Accounts identity hack things to ensure that still works.
function ensureStartOverKeepsIdentity() {
Cu.import("resource://gre/modules/Services.jsm");
Services.prefs.setBoolPref("services.sync-testing.startOverKeepIdentity", true);
do_register_cleanup(function() {
Services.prefs.clearUserPref("services.sync-testing.startOverKeepIdentity");
});
}
ensureStartOverKeepsIdentity();

Просмотреть файл

@ -5,6 +5,7 @@ var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
"use strict";
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
(function initFxAccountsTestingInfrastructure() {

Просмотреть файл

@ -4,7 +4,6 @@
"use strict";
Cu.import("resource://services-common/utils.js");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FxAccounts.jsm");
Cu.import("resource://gre/modules/FxAccountsClient.jsm");
Cu.import("resource://gre/modules/FxAccountsCommon.js");

Просмотреть файл

@ -4,7 +4,6 @@
"use strict";
Cu.import("resource://services-common/utils.js");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FxAccounts.jsm");
Cu.import("resource://gre/modules/FxAccountsClient.jsm");
Cu.import("resource://gre/modules/FxAccountsCommon.js");

Просмотреть файл

@ -10,7 +10,6 @@ Services.prefs.setCharPref("identity.fxaccounts.auth.uri", "http://localhost");
// See verbose logging from FxAccounts.jsm
Services.prefs.setCharPref("identity.fxaccounts.loglevel", "Trace");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FxAccounts.jsm");
Cu.import("resource://gre/modules/FxAccountsClient.jsm");
Cu.import("resource://gre/modules/FxAccountsCommon.js");

Просмотреть файл

@ -5,7 +5,6 @@
Cu.import("resource://gre/modules/FxAccountsCommon.js");
Cu.import("resource://gre/modules/FxAccountsOAuthGrantClient.jsm");
Cu.import("resource://gre/modules/Services.jsm");
const CLIENT_OPTIONS = {
serverURL: "http://127.0.0.1:9010/v1",

Просмотреть файл

@ -6,7 +6,6 @@
// Tests for the FxA push service.
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Promise.jsm");
Cu.import("resource://gre/modules/FxAccountsCommon.js");
Cu.import("resource://gre/modules/Log.jsm");

Просмотреть файл

@ -6,7 +6,6 @@
// Tests for the FxA storage manager.
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FxAccountsStorage.jsm");
Cu.import("resource://gre/modules/FxAccountsCommon.js");
Cu.import("resource://gre/modules/Log.jsm");

Просмотреть файл

@ -831,17 +831,6 @@ Sync11Service.prototype = {
this.identity.deleteSyncCredentials();
// If necessary, reset the identity manager, then re-initialize it so the
// FxA manager is used. This is configurable via a pref - mainly for tests.
let keepIdentity = false;
try {
keepIdentity = Services.prefs.getBoolPref("services.sync-testing.startOverKeepIdentity");
} catch (_) { /* no such pref */ }
if (keepIdentity) {
Svc.Obs.notify("weave:service:start-over:finish");
return;
}
try {
this.identity.finalize();
// an observer so the FxA migration code can take some action before

Просмотреть файл

@ -49,7 +49,6 @@ async function setup() {
async function cleanup(server) {
Svc.Obs.notify("weave:engine:stop-tracking");
Services.prefs.setBoolPref("services.sync-testing.startOverKeepIdentity", true);
let promiseStartOver = promiseOneObserver("weave:service:start-over:finish");
Service.startOver();
await promiseStartOver;