mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1296767 part 6 - Remove startOverKeepIdentity pref. r=markh
MozReview-Commit-ID: 7YDYTCRiKZa --HG-- extra : rebase_source : 41574e70bd92ee2abe6f92a799c57e1f5910f8b4
This commit is contained in:
parent
9050cab070
commit
17b83cde16
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user