Bug 964922 - Enable FxA Sync on Nightly r=markh
authorTim Taubert <ttaubert@mozilla.com>
Thu, 30 Jan 2014 12:09:12 -0800
changeset 182440 c21d44250e0c3b35bf23abac778cc63207ccf89f
parent 182439 d0b0160601f7c484a7a16861c520088ddc0d878c
child 182441 8840c133115a9c261fddfcfa91b8ff64ef92363d
child 182457 b3a41a5f1972abd1e0b0b1afb61759e811c25637
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs964922
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 964922 - Enable FxA Sync on Nightly r=markh
browser/base/content/test/general/browser_aboutAccounts.js
services/common/tests/unit/head_helpers.js
services/sync/Weave.js
--- a/browser/base/content/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -6,27 +6,25 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
   "resource://gre/modules/FxAccounts.jsm");
 
 registerCleanupFunction(function() {
   // Ensure we don't pollute prefs for next tests.
-  Services.prefs.clearUserPref("identity.fxaccounts.enabled");
   Services.prefs.clearUserPref("identity.fxaccounts.remote.uri");
 });
 
 let gTests = [
 
 {
   desc: "Test the remote commands",
   setup: function ()
   {
-    Services.prefs.setBoolPref("identity.fxaccounts.enabled", true);
     Services.prefs.setCharPref("identity.fxaccounts.remote.uri",
                                "https://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html");
   },
   run: function ()
   {
     let deferred = Promise.defer();
 
     let results = 0;
--- a/services/common/tests/unit/head_helpers.js
+++ b/services/common/tests/unit/head_helpers.js
@@ -173,12 +173,11 @@ function uninstallFakePAC() {
   Cm.nsIComponentRegistrar.unregisterFactory(CID, PACSystemSettings);
 }
 
 // We want to ensure the legacy provider is used for most of these tests; the
 // tests that know how to deal with the Firefox Accounts identity hack things
 // to ensure that still works.
 function setDefaultIdentityConfig() {
   Cu.import("resource://gre/modules/Services.jsm");
-  Services.prefs.setBoolPref("identity.fxaccounts.enabled", false);
-//  Services.prefs.setBoolPref("services.sync.fxaccounts.enabled", false);
+  Services.prefs.setBoolPref("services.sync.fxaccounts.enabled", false);
 }
 setDefaultIdentityConfig();
--- a/services/sync/Weave.js
+++ b/services/sync/Weave.js
@@ -61,34 +61,16 @@ WeaveService.prototype = {
   ensureLoaded: function () {
     Components.utils.import("resource://services-sync/main.js");
 
     // Side-effect of accessing the service is that it is instantiated.
     Weave.Service;
   },
 
   get fxAccountsEnabled() {
-    // first check if Firefox accounts is available at all.  This is so we can
-    // get this landed without forcing Fxa to be used (and require nightly
-    // testers to manually set this pref)
-    // Once we decide we want Fxa to be available, we just remove this block
-    // (although a fly in this ointment is tests - it might be that we must
-    // just set this as a pref with a default of true)
-    let fxAccountsAvailable;
-    try {
-      fxAccountsAvailable = Services.prefs.getBoolPref("identity.fxaccounts.enabled");
-    } catch (_) {
-    }
-    if (!fxAccountsAvailable) {
-      // Currently we don't support toggling this pref after initialization, so
-      // inject the pref value as a regular boolean.
-      delete this.fxAccountsEnabled;
-      this.fxAccountsEnabled = false;
-      return false;
-    }
     // work out what identity manager to use.  This is stored in a preference;
     // if the preference exists, we trust it.
     let fxAccountsEnabled;
     try {
       fxAccountsEnabled = Services.prefs.getBoolPref("services.sync.fxaccounts.enabled");
     } catch (_) {
       // That pref doesn't exist - so let's assume this is a first-run.
       // If sync already appears configured, we assume it's for the legacy