Bug 957421 - Keep FxA pref names consistent r=markh,rnewman,nalexander
authorTim Taubert <ttaubert@mozilla.com>
Tue, 21 Jan 2014 14:13:45 +0100
changeset 164833 088a4bf454a9991982d507adb0099b18abc9e5bc
parent 164832 2da09980b901b664f82477654fdf6c0cc070aa51
child 164834 690fc57732bb55b21e56e0185c6658451134f86d
push id4516
push userttaubert@mozilla.com
push dateThu, 23 Jan 2014 12:53:51 +0000
treeherderfx-team@088a4bf454a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, rnewman, nalexander
bugs957421
milestone29.0a1
Bug 957421 - Keep FxA pref names consistent r=markh,rnewman,nalexander
browser/app/profile/firefox.js
browser/base/content/test/general/browser_aboutAccounts.js
mobile/android/app/mobile.js
mobile/android/chrome/content/aboutAccounts.js
services/fxaccounts/FxAccounts.jsm
services/fxaccounts/tests/xpcshell/test_accounts.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1332,12 +1332,12 @@ pref("geo.wifi.uri", "https://www.google
 // currently irrelevant for desktop e10s
 pref("network.disable.ipc.security", true);
 
 // CustomizableUI debug logging.
 pref("browser.uiCustomization.debug", false);
 
 // The URL where remote content that composes the UI for Firefox Accounts should
 // be fetched. Must use HTTPS.
-pref("firefox.accounts.remoteUrl", "https://accounts.dev.lcip.org/?service=sync");
+pref("identity.fxaccounts.remote.uri", "https://accounts.dev.lcip.org/?service=sync");
 
 // The URL of the Firefox Accounts auth server backend
 pref("identity.fxaccounts.auth.uri", "https://api-accounts.dev.lcip.org/v1");
--- a/browser/base/content/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -1,89 +1,89 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
-  "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
-  "resource://gre/modules/Task.jsm");
-
-registerCleanupFunction(function() {
-  // Ensure we don't pollute prefs for next tests.
-  Services.prefs.clearUserPref("firefox.accounts.remoteUrl");
-});
-
-let gTests = [
-
-{
-  desc: "Test the remote commands",
-  setup: function ()
-  {
-    Services.prefs.setCharPref("firefox.accounts.remoteUrl",
-                               "https://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html");
-  },
-  run: function ()
-  {
-    let deferred = Promise.defer();
-
-    let results = 0;
-    try {
-      let win = gBrowser.contentWindow;
-      win.addEventListener("message", function testLoad(e) {
-        if (e.data.type == "testResult") {
-          ok(e.data.pass, e.data.info);
-          results++;
-        }
-        else if (e.data.type == "testsComplete") {
-          is(results, e.data.count, "Checking number of results received matches the number of tests that should have run");
-          win.removeEventListener("message", testLoad, false, true);
-          deferred.resolve();
-        }
-
-      }, false, true);
-
-    } catch(e) {
-      ok(false, "Failed to get all commands");
-      deferred.reject();
-    }
-    return deferred.promise;
-  }
-},
-
-
-]; // gTests
-
-function test()
-{
-  waitForExplicitFinish();
-
-  Task.spawn(function () {
-    for (let test of gTests) {
-      info(test.desc);
-      test.setup();
-
-      yield promiseNewTabLoadEvent("about:accounts");
-
-      yield test.run();
-
-      gBrowser.removeCurrentTab();
-    }
-
-    finish();
-  });
-}
-
-function promiseNewTabLoadEvent(aUrl, aEventType="load")
-{
-  let deferred = Promise.defer();
-  let tab = gBrowser.selectedTab = gBrowser.addTab(aUrl);
-  tab.linkedBrowser.addEventListener(aEventType, function load(event) {
-    tab.linkedBrowser.removeEventListener(aEventType, load, true);
-    let iframe = tab.linkedBrowser.contentDocument.getElementById("remote");
-      iframe.addEventListener("load", function frameLoad(e) {
-        iframe.removeEventListener("load", frameLoad, false);
-        deferred.resolve();
-      }, false);
-    }, true);
-  return deferred.promise;
-}
-
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+XPCOMUtils.defineLazyModuleGetter(this, "Promise",
+  "resource://gre/modules/Promise.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "Task",
+  "resource://gre/modules/Task.jsm");
+
+registerCleanupFunction(function() {
+  // Ensure we don't pollute prefs for next tests.
+  Services.prefs.clearUserPref("identity.fxaccounts.remote.uri");
+});
+
+let gTests = [
+
+{
+  desc: "Test the remote commands",
+  setup: function ()
+  {
+    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;
+    try {
+      let win = gBrowser.contentWindow;
+      win.addEventListener("message", function testLoad(e) {
+        if (e.data.type == "testResult") {
+          ok(e.data.pass, e.data.info);
+          results++;
+        }
+        else if (e.data.type == "testsComplete") {
+          is(results, e.data.count, "Checking number of results received matches the number of tests that should have run");
+          win.removeEventListener("message", testLoad, false, true);
+          deferred.resolve();
+        }
+
+      }, false, true);
+
+    } catch(e) {
+      ok(false, "Failed to get all commands");
+      deferred.reject();
+    }
+    return deferred.promise;
+  }
+},
+
+
+]; // gTests
+
+function test()
+{
+  waitForExplicitFinish();
+
+  Task.spawn(function () {
+    for (let test of gTests) {
+      info(test.desc);
+      test.setup();
+
+      yield promiseNewTabLoadEvent("about:accounts");
+
+      yield test.run();
+
+      gBrowser.removeCurrentTab();
+    }
+
+    finish();
+  });
+}
+
+function promiseNewTabLoadEvent(aUrl, aEventType="load")
+{
+  let deferred = Promise.defer();
+  let tab = gBrowser.selectedTab = gBrowser.addTab(aUrl);
+  tab.linkedBrowser.addEventListener(aEventType, function load(event) {
+    tab.linkedBrowser.removeEventListener(aEventType, load, true);
+    let iframe = tab.linkedBrowser.contentDocument.getElementById("remote");
+      iframe.addEventListener("load", function frameLoad(e) {
+        iframe.removeEventListener("load", frameLoad, false);
+        deferred.resolve();
+      }, false);
+    }, true);
+  return deferred.promise;
+}
+
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -796,17 +796,17 @@ pref("general.useragent.override.youtube
 
 // When true, phone number linkification is enabled.
 pref("browser.ui.linkify.phone", false);
 
 // Enables/disables Spatial Navigation
 pref("snav.enabled", true);
 
 // URL to fetch about:accounts web content from.
-pref("firefox.accounts.remoteUrl", "https://accounts.dev.lcip.org/mobile");
+pref("identity.fxaccounts.remote.uri", "https://accounts.dev.lcip.org/mobile");
 
 // This url, if changed, MUST continue to point to an https url. Pulling arbitrary content to inject into
 // this page over http opens us up to a man-in-the-middle attack that we'd rather not face. If you are a downstream
 // repackager of this code using an alternate snippet url, please keep your users safe
 pref("browser.snippets.updateUrl", "https://snippets.mozilla.com/json/%SNIPPETS_VERSION%/%NAME%/%VERSION%/%APPBUILDID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/");
 
 // How frequently we check for new snippets, in seconds (1 day)
 pref("browser.snippets.updateInterval", 86400);
--- a/mobile/android/chrome/content/aboutAccounts.js
+++ b/mobile/android/chrome/content/aboutAccounts.js
@@ -88,17 +88,17 @@ let wrapper = {
     sendMessageToJava({
       type: "FxAccount:Verified",
       data: data,
     });
   },
 
   get accountsURI() {
     delete this.accountsURI;
-    return this.accountsURI = Services.urlFormatter.formatURLPref("firefox.accounts.remoteUrl");
+    return this.accountsURI = Services.urlFormatter.formatURLPref("identity.fxaccounts.remote.uri");
   },
 
   handleRemoteCommand: function (evt) {
     log.debug('command: ' + evt.detail.command);
     let data = evt.detail.data;
 
     switch (evt.detail.command) {
       case "create":
--- a/services/fxaccounts/FxAccounts.jsm
+++ b/services/fxaccounts/FxAccounts.jsm
@@ -577,17 +577,17 @@ this.FxAccounts.prototype = Object.freez
    *         The promise is rejected if a storage error occurs.
    */
   signOut: function signOut() {
     return internal.signOut();
   },
 
   // Return the URI of the remote UI flows.
   getAccountsURI: function() {
-    let url = Services.urlFormatter.formatURLPref("firefox.accounts.remoteUrl");
+    let url = Services.urlFormatter.formatURLPref("identity.fxaccounts.remote.uri");
     if (!/^https:/.test(url)) { // Comment to un-break emacs js-mode highlighting
       throw new Error("Firefox Accounts server must use HTTPS");
     }
     return url;
   }
 });
 
 /**
--- a/services/fxaccounts/tests/xpcshell/test_accounts.js
+++ b/services/fxaccounts/tests/xpcshell/test_accounts.js
@@ -111,23 +111,23 @@ let MockFxAccounts = function() {
   FxAccounts.apply(this, [mockInternal]);
 };
 MockFxAccounts.prototype = {
   __proto__: FxAccounts.prototype,
 };
 
 add_test(function test_non_https_remote_server_uri() {
   Services.prefs.setCharPref(
-    "firefox.accounts.remoteUrl",
+    "identity.fxaccounts.remote.uri",
     "http://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html");
   do_check_throws_message(function () {
     fxAccounts.getAccountsURI();
   }, "Firefox Accounts server must use HTTPS");
 
-  Services.prefs.clearUserPref("firefox.accounts.remoteUrl");
+  Services.prefs.clearUserPref("identity.fxaccounts.remote.uri");
 
   run_next_test();
 });
 
 add_task(function test_get_signed_in_user_initially_unset() {
   // This test, unlike the rest, uses an un-mocked FxAccounts instance.
   // However, we still need to pass an object to the constructor to
   // force it to expose "internal", so we can test the disk storage.