Bug 1333044 - Prepare services/ for enabling no-undef eslint rule. r?jaws draft
authorMark Banner <standard8@mozilla.com>
Tue, 17 Jan 2017 12:25:43 +0000
changeset 467899 4ef47582341ade7ee1c9081e7692d267e53ffabc
parent 467834 71224049c0b52ab190564d3ea0eab089a159a4cf
child 467900 a9379944828b3eabea31ec9d8813d012af1f7e0c
push id43297
push userbmo:standard8@mozilla.com
push dateMon, 30 Jan 2017 09:37:19 +0000
reviewersjaws
bugs1333044
milestone54.0a1
Bug 1333044 - Prepare services/ for enabling no-undef eslint rule. r?jaws MozReview-Commit-ID: 29KwwyZH2jn
.eslintignore
services/cloudsync/tests/mochitest/.eslintrc.js
services/cloudsync/tests/mochitest/browser_tabEvents.js
services/cloudsync/tests/xpcshell/.eslintrc.js
services/common/services-common.js
services/common/tests/unit/.eslintrc.js
services/common/tests/unit/head_helpers.js
services/common/tests/unit/head_http.js
services/crypto/component/tests/unit/.eslintrc.js
services/crypto/modules/utils.js
services/crypto/tests/unit/.eslintrc.js
services/crypto/tests/unit/head_helpers.js
services/fxaccounts/FxAccountsCommon.js
services/fxaccounts/tests/browser/.eslintrc.js
services/fxaccounts/tests/mochitest/.eslintrc.js
services/fxaccounts/tests/xpcshell/.eslintrc.js
services/fxaccounts/tests/xpcshell/head.js
services/sync/services-sync.js
services/sync/tests/tps/.eslintrc.js
services/sync/tests/unit/.eslintrc.js
services/sync/tests/unit/head_appinfo.js
services/sync/tests/unit/head_errorhandler_common.js
services/sync/tests/unit/head_helpers.js
services/sync/tests/unit/head_http_server.js
services/sync/tests/unit/prefs_test_prefs_store.js
testing/xpcshell/xpcshell.eslintrc.js
tools/lint/eslint/modules.json
--- a/.eslintignore
+++ b/.eslintignore
@@ -176,17 +176,16 @@ mobile/android/components/Snippets.js
 mobile/android/modules/HomeProvider.jsm
 
 # services/ exclusions
 
 # Uses `#filter substitution`
 services/sync/modules/constants.js
 
 # Third party services
-services/sync/tps/extensions/mozmill/resource/stdlib/json2.js
 services/common/kinto-http-client.js
 services/common/kinto-offline-client.js
 services/sync/tps/extensions/mozmill
 
 # toolkit/ exclusions
 
 # Not part of the default build
 toolkit/components/help/**
new file mode 100644
--- /dev/null
+++ b/services/cloudsync/tests/mochitest/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/mochitest/chrome.eslintrc.js"
+  ]
+};
--- a/services/cloudsync/tests/mochitest/browser_tabEvents.js
+++ b/services/cloudsync/tests/mochitest/browser_tabEvents.js
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+/* global gBrowser:false */
+
 function test() {
 
   let local = {};
 
   Components.utils.import("resource://gre/modules/CloudSync.jsm", local);
   Components.utils.import("resource:///modules/sessionstore/TabStateFlusher.jsm", local);
 
   let cloudSync = local.CloudSync();
new file mode 100644
--- /dev/null
+++ b/services/cloudsync/tests/xpcshell/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/xpcshell/xpcshell.eslintrc.js"
+  ]
+};
--- a/services/common/services-common.js
+++ b/services/common/services-common.js
@@ -1,11 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file contains default preference values for components in
 // services-common.
 
+/* global pref */
+
 pref("services.common.log.logger.rest.request", "Debug");
 pref("services.common.log.logger.rest.response", "Debug");
 
 pref("services.common.log.logger.tokenserverclient", "Debug");
new file mode 100644
--- /dev/null
+++ b/services/common/tests/unit/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/xpcshell/xpcshell.eslintrc.js"
+  ]
+};
--- a/services/common/tests/unit/head_helpers.js
+++ b/services/common/tests/unit/head_helpers.js
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+/* import-globals-from head_global.js */
+
 Cu.import("resource://gre/modules/Log.jsm");
 Cu.import("resource://services-common/utils.js");
 Cu.import("resource://testing-common/httpd.js");
 Cu.import("resource://testing-common/services/common/logging.js");
 Cu.import("resource://testing-common/MockRegistrar.jsm");
 
 var btoa = Cu.import("resource://gre/modules/Log.jsm").btoa;
 var atob = Cu.import("resource://gre/modules/Log.jsm").atob;
--- a/services/common/tests/unit/head_http.js
+++ b/services/common/tests/unit/head_http.js
@@ -1,11 +1,13 @@
- /* Any copyright is dedicated to the Public Domain.
+/* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+/* import-globals-from head_global.js */
+
 Cu.import("resource://services-common/utils.js");
 
 function basic_auth_header(user, password) {
   return "Basic " + btoa(user + ":" + CommonUtils.encodeUTF8(password));
 }
 
 function basic_auth_matches(req, user, password) {
   if (!req.hasHeader("Authorization")) {
new file mode 100644
--- /dev/null
+++ b/services/crypto/component/tests/unit/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
+  ]
+};
--- a/services/crypto/modules/utils.js
+++ b/services/crypto/modules/utils.js
@@ -4,16 +4,17 @@
 
 var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
 
 this.EXPORTED_SYMBOLS = ["CryptoUtils"];
 
 Cu.import("resource://services-common/observers.js");
 Cu.import("resource://services-common/utils.js");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+Cu.import("resource://services-sync/constants.js");
 
 this.CryptoUtils = {
   xor: function xor(a, b) {
     let bytes = [];
 
     if (a.length != b.length) {
       throw new Error("can't xor unequal length strings: " + a.length + " vs " + b.length);
     }
new file mode 100644
--- /dev/null
+++ b/services/crypto/tests/unit/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/xpcshell/xpcshell.eslintrc.js"
+  ]
+};
--- a/services/crypto/tests/unit/head_helpers.js
+++ b/services/crypto/tests/unit/head_helpers.js
@@ -1,13 +1,15 @@
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 var Cu = Components.utils;
 
+/* import-globals-from ../../../common/tests/unit/head_helpers.js */
+
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 try {
   // In the context of xpcshell tests, there won't be a default AppInfo
   Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
 } catch (ex) {
 
 // Make sure to provide the right OS so crypto loads the right binaries
--- a/services/fxaccounts/FxAccountsCommon.js
+++ b/services/fxaccounts/FxAccountsCommon.js
@@ -264,106 +264,106 @@ exports.ERROR_TO_GENERAL_ERROR_CLASS = {
 for (let id in exports) {
   this[id] = exports[id];
 }
 
 // Allow this file to be imported via Components.utils.import().
 this.EXPORTED_SYMBOLS = Object.keys(exports);
 
 // Set these up now that everything has been loaded into |this|.
-SERVER_ERRNO_TO_ERROR[ERRNO_ACCOUNT_ALREADY_EXISTS]         = ERROR_ACCOUNT_ALREADY_EXISTS;
-SERVER_ERRNO_TO_ERROR[ERRNO_ACCOUNT_DOES_NOT_EXIST]         = ERROR_ACCOUNT_DOES_NOT_EXIST;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_PASSWORD]             = ERROR_INVALID_PASSWORD;
-SERVER_ERRNO_TO_ERROR[ERRNO_UNVERIFIED_ACCOUNT]             = ERROR_UNVERIFIED_ACCOUNT;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_VERIFICATION_CODE]      = ERROR_INVALID_VERIFICATION_CODE;
-SERVER_ERRNO_TO_ERROR[ERRNO_NOT_VALID_JSON_BODY]            = ERROR_NOT_VALID_JSON_BODY;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_BODY_PARAMETERS]        = ERROR_INVALID_BODY_PARAMETERS;
-SERVER_ERRNO_TO_ERROR[ERRNO_MISSING_BODY_PARAMETERS]        = ERROR_MISSING_BODY_PARAMETERS;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_REQUEST_SIGNATURE]      = ERROR_INVALID_REQUEST_SIGNATURE;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_AUTH_TOKEN]             = ERROR_INVALID_AUTH_TOKEN;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_AUTH_TIMESTAMP]         = ERROR_INVALID_AUTH_TIMESTAMP;
-SERVER_ERRNO_TO_ERROR[ERRNO_MISSING_CONTENT_LENGTH]         = ERROR_MISSING_CONTENT_LENGTH;
-SERVER_ERRNO_TO_ERROR[ERRNO_REQUEST_BODY_TOO_LARGE]         = ERROR_REQUEST_BODY_TOO_LARGE;
-SERVER_ERRNO_TO_ERROR[ERRNO_TOO_MANY_CLIENT_REQUESTS]       = ERROR_TOO_MANY_CLIENT_REQUESTS;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_AUTH_NONCE]             = ERROR_INVALID_AUTH_NONCE;
-SERVER_ERRNO_TO_ERROR[ERRNO_ENDPOINT_NO_LONGER_SUPPORTED]   = ERROR_ENDPOINT_NO_LONGER_SUPPORTED;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_LOGIN_METHOD]         = ERROR_INCORRECT_LOGIN_METHOD;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_KEY_RETRIEVAL_METHOD] = ERROR_INCORRECT_KEY_RETRIEVAL_METHOD;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_API_VERSION]          = ERROR_INCORRECT_API_VERSION;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_EMAIL_CASE]           = ERROR_INCORRECT_EMAIL_CASE;
-SERVER_ERRNO_TO_ERROR[ERRNO_ACCOUNT_LOCKED]                 = ERROR_ACCOUNT_LOCKED;
-SERVER_ERRNO_TO_ERROR[ERRNO_ACCOUNT_UNLOCKED]               = ERROR_ACCOUNT_UNLOCKED;
-SERVER_ERRNO_TO_ERROR[ERRNO_UNKNOWN_DEVICE]                 = ERROR_UNKNOWN_DEVICE;
-SERVER_ERRNO_TO_ERROR[ERRNO_DEVICE_SESSION_CONFLICT]        = ERROR_DEVICE_SESSION_CONFLICT;
-SERVER_ERRNO_TO_ERROR[ERRNO_SERVICE_TEMP_UNAVAILABLE]       = ERROR_SERVICE_TEMP_UNAVAILABLE;
-SERVER_ERRNO_TO_ERROR[ERRNO_UNKNOWN_ERROR]                  = ERROR_UNKNOWN;
-SERVER_ERRNO_TO_ERROR[ERRNO_NETWORK]                        = ERROR_NETWORK;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_ACCOUNT_ALREADY_EXISTS]         = exports.ERROR_ACCOUNT_ALREADY_EXISTS;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_ACCOUNT_DOES_NOT_EXIST]         = exports.ERROR_ACCOUNT_DOES_NOT_EXIST;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_PASSWORD]             = exports.ERROR_INVALID_PASSWORD;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_UNVERIFIED_ACCOUNT]             = exports.ERROR_UNVERIFIED_ACCOUNT;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_VERIFICATION_CODE]      = exports.ERROR_INVALID_VERIFICATION_CODE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_NOT_VALID_JSON_BODY]            = exports.ERROR_NOT_VALID_JSON_BODY;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_BODY_PARAMETERS]        = exports.ERROR_INVALID_BODY_PARAMETERS;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_MISSING_BODY_PARAMETERS]        = exports.ERROR_MISSING_BODY_PARAMETERS;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_REQUEST_SIGNATURE]      = exports.ERROR_INVALID_REQUEST_SIGNATURE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_AUTH_TOKEN]             = exports.ERROR_INVALID_AUTH_TOKEN;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_AUTH_TIMESTAMP]         = exports.ERROR_INVALID_AUTH_TIMESTAMP;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_MISSING_CONTENT_LENGTH]         = exports.ERROR_MISSING_CONTENT_LENGTH;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_REQUEST_BODY_TOO_LARGE]         = exports.ERROR_REQUEST_BODY_TOO_LARGE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_TOO_MANY_CLIENT_REQUESTS]       = exports.ERROR_TOO_MANY_CLIENT_REQUESTS;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_AUTH_NONCE]             = exports.ERROR_INVALID_AUTH_NONCE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_ENDPOINT_NO_LONGER_SUPPORTED]   = exports.ERROR_ENDPOINT_NO_LONGER_SUPPORTED;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_LOGIN_METHOD]         = exports.ERROR_INCORRECT_LOGIN_METHOD;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_KEY_RETRIEVAL_METHOD] = exports.ERROR_INCORRECT_KEY_RETRIEVAL_METHOD;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_API_VERSION]          = exports.ERROR_INCORRECT_API_VERSION;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_EMAIL_CASE]           = exports.ERROR_INCORRECT_EMAIL_CASE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_ACCOUNT_LOCKED]                 = exports.ERROR_ACCOUNT_LOCKED;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_ACCOUNT_UNLOCKED]               = exports.ERROR_ACCOUNT_UNLOCKED;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_UNKNOWN_DEVICE]                 = exports.ERROR_UNKNOWN_DEVICE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_DEVICE_SESSION_CONFLICT]        = exports.ERROR_DEVICE_SESSION_CONFLICT;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_SERVICE_TEMP_UNAVAILABLE]       = exports.ERROR_SERVICE_TEMP_UNAVAILABLE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_UNKNOWN_ERROR]                  = exports.ERROR_UNKNOWN;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_NETWORK]                        = exports.ERROR_NETWORK;
 
 // oauth
-SERVER_ERRNO_TO_ERROR[ERRNO_UNKNOWN_CLIENT_ID]              = ERROR_UNKNOWN_CLIENT_ID;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_CLIENT_SECRET]        = ERROR_INCORRECT_CLIENT_SECRET;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_REDIRECT_URI]         = ERROR_INCORRECT_REDIRECT_URI;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_FXA_ASSERTION]          = ERROR_INVALID_FXA_ASSERTION;
-SERVER_ERRNO_TO_ERROR[ERRNO_UNKNOWN_CODE]                   = ERROR_UNKNOWN_CODE;
-SERVER_ERRNO_TO_ERROR[ERRNO_INCORRECT_CODE]                 = ERROR_INCORRECT_CODE;
-SERVER_ERRNO_TO_ERROR[ERRNO_EXPIRED_CODE]                   = ERROR_EXPIRED_CODE;
-SERVER_ERRNO_TO_ERROR[ERRNO_OAUTH_INVALID_TOKEN]            = ERROR_OAUTH_INVALID_TOKEN;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_REQUEST_PARAM]          = ERROR_INVALID_REQUEST_PARAM;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_RESPONSE_TYPE]          = ERROR_INVALID_RESPONSE_TYPE;
-SERVER_ERRNO_TO_ERROR[ERRNO_UNAUTHORIZED]                   = ERROR_UNAUTHORIZED;
-SERVER_ERRNO_TO_ERROR[ERRNO_FORBIDDEN]                      = ERROR_FORBIDDEN;
-SERVER_ERRNO_TO_ERROR[ERRNO_INVALID_CONTENT_TYPE]           = ERROR_INVALID_CONTENT_TYPE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_UNKNOWN_CLIENT_ID]              = exports.ERROR_UNKNOWN_CLIENT_ID;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_CLIENT_SECRET]        = exports.ERROR_INCORRECT_CLIENT_SECRET;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_REDIRECT_URI]         = exports.ERROR_INCORRECT_REDIRECT_URI;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_FXA_ASSERTION]          = exports.ERROR_INVALID_FXA_ASSERTION;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_UNKNOWN_CODE]                   = exports.ERROR_UNKNOWN_CODE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INCORRECT_CODE]                 = exports.ERROR_INCORRECT_CODE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_EXPIRED_CODE]                   = exports.ERROR_EXPIRED_CODE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_OAUTH_INVALID_TOKEN]            = exports.ERROR_OAUTH_INVALID_TOKEN;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_REQUEST_PARAM]          = exports.ERROR_INVALID_REQUEST_PARAM;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_RESPONSE_TYPE]          = exports.ERROR_INVALID_RESPONSE_TYPE;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_UNAUTHORIZED]                   = exports.ERROR_UNAUTHORIZED;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_FORBIDDEN]                      = exports.ERROR_FORBIDDEN;
+exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_INVALID_CONTENT_TYPE]           = exports.ERROR_INVALID_CONTENT_TYPE;
 
 
 // Map internal errors to more generic error classes for consumers
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_ACCOUNT_ALREADY_EXISTS]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_ACCOUNT_DOES_NOT_EXIST]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_ACCOUNT_LOCKED]                 = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_ACCOUNT_UNLOCKED]               = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_ALREADY_SIGNED_IN_USER]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_DEVICE_SESSION_CONFLICT]        = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_ENDPOINT_NO_LONGER_SUPPORTED]   = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_API_VERSION]          = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_EMAIL_CASE]           = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_KEY_RETRIEVAL_METHOD] = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_LOGIN_METHOD]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_EMAIL]                  = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_AUDIENCE]               = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_AUTH_TOKEN]             = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_AUTH_TIMESTAMP]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_AUTH_NONCE]             = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_BODY_PARAMETERS]        = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_PASSWORD]               = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_VERIFICATION_CODE]      = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_REFRESH_AUTH_VALUE]     = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_REQUEST_SIGNATURE]      = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INTERNAL_INVALID_USER]          = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_MISSING_BODY_PARAMETERS]        = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_MISSING_CONTENT_LENGTH]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_NO_TOKEN_SESSION]               = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_NO_SILENT_REFRESH_AUTH]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_NOT_VALID_JSON_BODY]            = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_PERMISSION_DENIED]              = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_REQUEST_BODY_TOO_LARGE]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_UNKNOWN_DEVICE]                 = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_UNVERIFIED_ACCOUNT]             = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_UI_ERROR]                       = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_UI_REQUEST]                     = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_OFFLINE]                        = ERROR_NETWORK;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_SERVER_ERROR]                   = ERROR_NETWORK;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_TOO_MANY_CLIENT_REQUESTS]       = ERROR_NETWORK;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_SERVICE_TEMP_UNAVAILABLE]       = ERROR_NETWORK;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_PARSE]                          = ERROR_NETWORK;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_NETWORK]                        = ERROR_NETWORK;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_ACCOUNT_ALREADY_EXISTS]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_ACCOUNT_DOES_NOT_EXIST]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_ACCOUNT_LOCKED]                 = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_ACCOUNT_UNLOCKED]               = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_ALREADY_SIGNED_IN_USER]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_DEVICE_SESSION_CONFLICT]        = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_ENDPOINT_NO_LONGER_SUPPORTED]   = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_API_VERSION]          = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_EMAIL_CASE]           = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_KEY_RETRIEVAL_METHOD] = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_LOGIN_METHOD]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_EMAIL]                  = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_AUDIENCE]               = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_AUTH_TOKEN]             = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_AUTH_TIMESTAMP]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_AUTH_NONCE]             = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_BODY_PARAMETERS]        = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_PASSWORD]               = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_VERIFICATION_CODE]      = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_REFRESH_AUTH_VALUE]     = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_REQUEST_SIGNATURE]      = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INTERNAL_INVALID_USER]          = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_MISSING_BODY_PARAMETERS]        = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_MISSING_CONTENT_LENGTH]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_NO_TOKEN_SESSION]               = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_NO_SILENT_REFRESH_AUTH]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_NOT_VALID_JSON_BODY]            = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_PERMISSION_DENIED]              = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_REQUEST_BODY_TOO_LARGE]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_UNKNOWN_DEVICE]                 = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_UNVERIFIED_ACCOUNT]             = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_UI_ERROR]                       = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_UI_REQUEST]                     = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_OFFLINE]                        = exports.ERROR_NETWORK;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_SERVER_ERROR]                   = exports.ERROR_NETWORK;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_TOO_MANY_CLIENT_REQUESTS]       = exports.ERROR_NETWORK;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_SERVICE_TEMP_UNAVAILABLE]       = exports.ERROR_NETWORK;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_PARSE]                          = exports.ERROR_NETWORK;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_NETWORK]                        = exports.ERROR_NETWORK;
 
 // oauth
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_CLIENT_SECRET]        = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_REDIRECT_URI]         = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_FXA_ASSERTION]          = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_UNKNOWN_CODE]                   = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INCORRECT_CODE]                 = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_EXPIRED_CODE]                   = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_OAUTH_INVALID_TOKEN]            = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_REQUEST_PARAM]          = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_RESPONSE_TYPE]          = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_UNAUTHORIZED]                   = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_FORBIDDEN]                      = ERROR_AUTH_ERROR;
-ERROR_TO_GENERAL_ERROR_CLASS[ERROR_INVALID_CONTENT_TYPE]           = ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_CLIENT_SECRET]        = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_REDIRECT_URI]         = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_FXA_ASSERTION]          = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_UNKNOWN_CODE]                   = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INCORRECT_CODE]                 = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_EXPIRED_CODE]                   = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_OAUTH_INVALID_TOKEN]            = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_REQUEST_PARAM]          = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_RESPONSE_TYPE]          = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_UNAUTHORIZED]                   = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_FORBIDDEN]                      = exports.ERROR_AUTH_ERROR;
+exports.ERROR_TO_GENERAL_ERROR_CLASS[exports.ERROR_INVALID_CONTENT_TYPE]           = exports.ERROR_AUTH_ERROR;
new file mode 100644
--- /dev/null
+++ b/services/fxaccounts/tests/browser/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/mochitest/chrome.eslintrc.js"
+  ]
+};
new file mode 100644
--- /dev/null
+++ b/services/fxaccounts/tests/mochitest/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/mochitest/mochitest.eslintrc.js"
+  ]
+};
new file mode 100644
--- /dev/null
+++ b/services/fxaccounts/tests/xpcshell/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/xpcshell/xpcshell.eslintrc.js"
+  ]
+};
--- a/services/fxaccounts/tests/xpcshell/head.js
+++ b/services/fxaccounts/tests/xpcshell/head.js
@@ -1,19 +1,21 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
+/* import-globals-from ../../../common/tests/unit/head_helpers.js */
+/* import-globals-from ../../../common/tests/unit/head_http.js */
+
 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() {
   do_get_profile();
 
   let ns = {};
   Cu.import("resource://testing-common/services/common/logging.js", ns);
 
   ns.initTestLogging("Trace");
 }).call(this);
-
--- a/services/sync/services-sync.js
+++ b/services/sync/services-sync.js
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+/* global pref */
+
 pref("services.sync.lastversion", "firstrun");
 pref("services.sync.sendVersionInfo", true);
 
 pref("services.sync.scheduler.eolInterval", 604800); // 1 week
 pref("services.sync.scheduler.idleInterval", 3600);  // 1 hour
 pref("services.sync.scheduler.activeInterval", 600);   // 10 minutes
 pref("services.sync.scheduler.immediateInterval", 90);    // 1.5 minutes
 pref("services.sync.scheduler.idleTime", 300);   // 5 minutes
new file mode 100644
--- /dev/null
+++ b/services/sync/tests/tps/.eslintrc.js
@@ -0,0 +1,35 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/mochitest/mochitest.eslintrc.js"
+  ],
+
+  globals: {
+    // Globals specific to mozmill
+    "assert": false,
+    "controller": false,
+    "findElement": false,
+    "mozmill": false,
+    // Injected into tests via tps.jsm
+    "Addons": false,
+    "Bookmarks": false,
+    "EnableEngines": false,
+    "EnsureTracking": false,
+    "Formdata": false,
+    "History": false,
+    "Login": false,
+    "Passwords": false,
+    "Phase": false,
+    "Prefs": false,
+    "RunMozmillTest": false,
+    "STATE_DISABLED": false,
+    "STATE_ENABLED": false,
+    "Sync": false,
+    "SYNC_WIPE_CLIENT": false,
+    "SYNC_WIPE_REMOTE": false,
+    "Tabs": false,
+    "Windows": false,
+    "WipeServer": false,
+  }
+};
new file mode 100644
--- /dev/null
+++ b/services/sync/tests/unit/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "../../../../testing/xpcshell/xpcshell.eslintrc.js"
+  ]
+};
--- a/services/sync/tests/unit/head_appinfo.js
+++ b/services/sync/tests/unit/head_appinfo.js
@@ -1,11 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+/* import-globals-from ../../../common/tests/unit/head_helpers.js */
+
 var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var gSyncProfile;
 
 gSyncProfile = do_get_profile();
 
--- a/services/sync/tests/unit/head_errorhandler_common.js
+++ b/services/sync/tests/unit/head_errorhandler_common.js
@@ -1,11 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+/* import-globals-from head_appinfo.js */
+/* import-globals-from ../../../common/tests/unit/head_helpers.js */
+/* import-globals-from head_http_server.js */
+
 Cu.import("resource://services-sync/engines.js");
 
 // Common code for test_errorhandler_{1,2}.js -- pulled out to make it less
 // monolithic and take less time to execute.
 const EHTestsCommon = {
 
   service_unavailable(request, response) {
     let body = "Service Unavailable";
--- a/services/sync/tests/unit/head_helpers.js
+++ b/services/sync/tests/unit/head_helpers.js
@@ -1,11 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+/* import-globals-from head_appinfo.js */
+/* import-globals-from ../../../common/tests/unit/head_helpers.js */
+
 Cu.import("resource://services-common/async.js");
 Cu.import("resource://testing-common/services/common/utils.js");
 Cu.import("resource://testing-common/PlacesTestUtils.jsm");
 Cu.import("resource://services-sync/util.js");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "SyncPingSchema", function() {
   let ns = {};
@@ -466,10 +469,8 @@ function promiseNextTick() {
   });
 }
 // Avoid an issue where `client.name2` containing unicode characters causes
 // a number of tests to fail, due to them assuming that we do not need to utf-8
 // encode or decode data sent through the mocked server (see bug 1268912).
 Utils.getDefaultDeviceName = function() {
   return "Test device name";
 };
-
-
--- a/services/sync/tests/unit/head_http_server.js
+++ b/services/sync/tests/unit/head_http_server.js
@@ -1,8 +1,11 @@
+/* import-globals-from head_appinfo.js */
+/* import-globals-from ../../../common/tests/unit/head_helpers.js */
+
 var Cm = Components.manager;
 
 // Shared logging for all HTTP server functions.
 Cu.import("resource://gre/modules/Log.jsm");
 const SYNC_HTTP_LOGGER = "Sync.Test.Server";
 const SYNC_API_VERSION = "1.1";
 
 // Use the same method that record.js does, which mirrors the server.
--- a/services/sync/tests/unit/prefs_test_prefs_store.js
+++ b/services/sync/tests/unit/prefs_test_prefs_store.js
@@ -1,10 +1,12 @@
 // This is a "preferences" file used by test_prefs_store.js
 
+/* global pref, user_pref */
+
 // The prefs that control what should be synced.
 // Most of these are "default" prefs, so the value itself will not sync.
 pref("services.sync.prefs.sync.testing.int", true);
 pref("services.sync.prefs.sync.testing.string", true);
 pref("services.sync.prefs.sync.testing.bool", true);
 pref("services.sync.prefs.sync.testing.dont.change", true);
 // this one is a user pref, so it *will* sync.
 user_pref("services.sync.prefs.sync.testing.turned.off", false);
--- a/testing/xpcshell/xpcshell.eslintrc.js
+++ b/testing/xpcshell/xpcshell.eslintrc.js
@@ -35,16 +35,18 @@ module.exports = {
     "do_register_cleanup": false,
     "do_report_unexpected_exception": false,
     "do_send_remote_message": false,
     "do_test_finished": false,
     "do_test_pending": false,
     "do_throw": false,
     "do_timeout": false,
     "equal": false,
+    // XPCShell specific function, see XPCShellEnvironment.cpp
+    "gczeal": false,
     "greater": false,
     "greaterOrEqual": false,
     "less": false,
     "lessOrEqual": false,
     "load": false,
     "mozinfo": false,
     "notDeepEqual": false,
     "notEqual": false,
--- a/tools/lint/eslint/modules.json
+++ b/tools/lint/eslint/modules.json
@@ -32,16 +32,17 @@
   "CloudSyncBookmarks.jsm": ["Bookmarks"],
   "CloudSyncBookmarksFolderCache.jsm": ["FolderCache"],
   "CloudSyncEventSource.jsm": ["EventSource"],
   "CloudSyncLocal.jsm": ["Local"],
   "CloudSyncPlacesWrapper.jsm": ["PlacesWrapper"],
   "CloudSyncTabs.jsm": ["Tabs"],
   "collection_validator.js": ["CollectionValidator", "CollectionProblemData"],
   "Console.jsm": ["console", "ConsoleAPI"],
+  "constants.js": ["WEAVE_VERSION", "SYNC_API_VERSION", "USER_API_VERSION", "MISC_API_VERSION", "STORAGE_VERSION", "PREFS_BRANCH", "PWDMGR_HOST", "PWDMGR_PASSWORD_REALM", "PWDMGR_PASSPHRASE_REALM", "PWDMGR_KEYBUNDLE_REALM", "DEFAULT_KEYBUNDLE_NAME", "HMAC_INPUT", "SYNC_KEY_ENCODED_LENGTH", "SYNC_KEY_DECODED_LENGTH", "SYNC_KEY_HYPHENATED_LENGTH", "NO_SYNC_NODE_INTERVAL", "MAX_ERROR_COUNT_BEFORE_BACKOFF", "MAX_IGNORE_ERROR_COUNT", "MINIMUM_BACKOFF_INTERVAL", "MAXIMUM_BACKOFF_INTERVAL", "HMAC_EVENT_INTERVAL", "MASTER_PASSWORD_LOCKED_RETRY_INTERVAL", "DEFAULT_BLOCK_PERIOD", "MOBILE_BATCH_SIZE", "DEFAULT_GUID_FETCH_BATCH_SIZE", "DEFAULT_MOBILE_GUID_FETCH_BATCH_SIZE", "DEFAULT_STORE_BATCH_SIZE", "HISTORY_STORE_BATCH_SIZE", "FORMS_STORE_BATCH_SIZE", "PASSWORDS_STORE_BATCH_SIZE", "ADDONS_STORE_BATCH_SIZE", "APPS_STORE_BATCH_SIZE", "DEFAULT_DOWNLOAD_BATCH_SIZE", "SINGLE_USER_THRESHOLD", "MULTI_DEVICE_THRESHOLD", "SCORE_INCREMENT_SMALL", "SCORE_INCREMENT_MEDIUM", "SCORE_INCREMENT_XLARGE", "SCORE_UPDATE_DELAY", "IDLE_OBSERVER_BACK_DELAY", "MAX_UPLOAD_RECORDS", "MAX_UPLOAD_BYTES", "MAX_HISTORY_UPLOAD", "MAX_HISTORY_DOWNLOAD", "NOTIFY_TAB_SENT_TTL_SECS", "STATUS_OK", "SYNC_FAILED", "LOGIN_FAILED", "SYNC_FAILED_PARTIAL", "CLIENT_NOT_CONFIGURED", "STATUS_DISABLED", "MASTER_PASSWORD_LOCKED", "LOGIN_SUCCEEDED", "SYNC_SUCCEEDED", "ENGINE_SUCCEEDED", "LOGIN_FAILED_NO_USERNAME", "LOGIN_FAILED_NO_PASSWORD", "LOGIN_FAILED_NO_PASSPHRASE", "LOGIN_FAILED_NETWORK_ERROR", "LOGIN_FAILED_SERVER_ERROR", "LOGIN_FAILED_INVALID_PASSPHRASE", "LOGIN_FAILED_LOGIN_REJECTED", "METARECORD_DOWNLOAD_FAIL", "VERSION_OUT_OF_DATE", "DESKTOP_VERSION_OUT_OF_DATE", "SETUP_FAILED_NO_PASSPHRASE", "CREDENTIALS_CHANGED", "ABORT_SYNC_COMMAND", "NO_SYNC_NODE_FOUND", "OVER_QUOTA", "PROLONGED_SYNC_FAILURE", "SERVER_MAINTENANCE", "RESPONSE_OVER_QUOTA", "ENGINE_UPLOAD_FAIL", "ENGINE_DOWNLOAD_FAIL", "ENGINE_UNKNOWN_FAIL", "ENGINE_APPLY_FAIL", "ENGINE_METARECORD_DOWNLOAD_FAIL", "ENGINE_METARECORD_UPLOAD_FAIL", "ENGINE_BATCH_INTERRUPTED", "JPAKE_ERROR_CHANNEL", "JPAKE_ERROR_NETWORK", "JPAKE_ERROR_SERVER", "JPAKE_ERROR_TIMEOUT", "JPAKE_ERROR_INTERNAL", "JPAKE_ERROR_INVALID", "JPAKE_ERROR_NODATA", "JPAKE_ERROR_KEYMISMATCH", "JPAKE_ERROR_WRONGMESSAGE", "JPAKE_ERROR_USERABORT", "JPAKE_ERROR_DELAYUNSUPPORTED", "INFO_COLLECTIONS", "INFO_COLLECTION_USAGE", "INFO_COLLECTION_COUNTS", "INFO_QUOTA", "kSyncMasterPasswordLocked", "kSyncWeaveDisabled", "kSyncNetworkOffline", "kSyncBackoffNotMet", "kFirstSyncChoiceNotMade", "FIREFOX_ID", "FENNEC_ID", "SEAMONKEY_ID", "TEST_HARNESS_ID", "MIN_PP_LENGTH", "MIN_PASS_LENGTH", "DEVICE_TYPE_DESKTOP", "DEVICE_TYPE_MOBILE", "SQLITE_MAX_VARIABLE_NUMBER"],
   "Constants.jsm": ["Roles", "Events", "Relations", "Filters", "States", "Prefilters"],
   "ContactDB.jsm": ["ContactDB", "DB_NAME", "STORE_NAME", "SAVED_GETALL_STORE_NAME", "REVISION_STORE", "DB_VERSION"],
   "content-server.jsm": ["init"],
   "content.jsm": ["registerContentFrame"],
   "ContentCrashHandlers.jsm": ["TabCrashHandler", "PluginCrashReporter", "UnsubmittedCrashHandler"],
   "ContentObservers.jsm": [],
   "ContentPrefUtils.jsm": ["ContentPref", "cbHandleResult", "cbHandleError", "cbHandleCompletion", "safeCallback"],
   "controller.js": ["MozMillController", "globalEventRegistry", "sleep", "windowMap"],
@@ -79,16 +80,17 @@
   "FormAutofillContent.jsm": ["FormAutofillHandler"],
   "forms.js": ["FormEngine", "FormRec", "FormValidator"],
   "forms.jsm": ["FormData"],
   "frame.js": ["Collector", "Runner", "events", "runTestFile", "log", "timers", "persisted", "shutdownApplication"],
   "FrameScriptManager.jsm": ["getNewLoaderID"],
   "fxa_utils.js": ["initializeIdentityWithTokenServerResponse"],
   "fxaccounts.jsm": ["Authentication"],
   "FxAccounts.jsm": ["fxAccounts", "FxAccounts"],
+  "FxAccountsCommon.js": ["log", "logPII", "FXACCOUNTS_PERMISSION", "DATA_FORMAT_VERSION", "DEFAULT_STORAGE_FILENAME", "ASSERTION_LIFETIME", "ASSERTION_USE_PERIOD", "CERT_LIFETIME", "KEY_LIFETIME", "POLL_SESSION", "ONLOGIN_NOTIFICATION", "ONVERIFIED_NOTIFICATION", "ONLOGOUT_NOTIFICATION", "ON_FXA_UPDATE_NOTIFICATION", "ON_DEVICE_CONNECTED_NOTIFICATION", "ON_DEVICE_DISCONNECTED_NOTIFICATION", "ON_PASSWORD_CHANGED_NOTIFICATION", "ON_PASSWORD_RESET_NOTIFICATION", "ON_COLLECTION_CHANGED_NOTIFICATION", "FXA_PUSH_SCOPE_ACCOUNT_UPDATE", "ON_PROFILE_CHANGE_NOTIFICATION", "ON_ACCOUNT_STATE_CHANGE_NOTIFICATION", "UI_REQUEST_SIGN_IN_FLOW", "UI_REQUEST_REFRESH_AUTH", "FX_OAUTH_CLIENT_ID", "WEBCHANNEL_ID", "ERRNO_ACCOUNT_ALREADY_EXISTS", "ERRNO_ACCOUNT_DOES_NOT_EXIST", "ERRNO_INCORRECT_PASSWORD", "ERRNO_UNVERIFIED_ACCOUNT", "ERRNO_INVALID_VERIFICATION_CODE", "ERRNO_NOT_VALID_JSON_BODY", "ERRNO_INVALID_BODY_PARAMETERS", "ERRNO_MISSING_BODY_PARAMETERS", "ERRNO_INVALID_REQUEST_SIGNATURE", "ERRNO_INVALID_AUTH_TOKEN", "ERRNO_INVALID_AUTH_TIMESTAMP", "ERRNO_MISSING_CONTENT_LENGTH", "ERRNO_REQUEST_BODY_TOO_LARGE", "ERRNO_TOO_MANY_CLIENT_REQUESTS", "ERRNO_INVALID_AUTH_NONCE", "ERRNO_ENDPOINT_NO_LONGER_SUPPORTED", "ERRNO_INCORRECT_LOGIN_METHOD", "ERRNO_INCORRECT_KEY_RETRIEVAL_METHOD", "ERRNO_INCORRECT_API_VERSION", "ERRNO_INCORRECT_EMAIL_CASE", "ERRNO_ACCOUNT_LOCKED", "ERRNO_ACCOUNT_UNLOCKED", "ERRNO_UNKNOWN_DEVICE", "ERRNO_DEVICE_SESSION_CONFLICT", "ERRNO_SERVICE_TEMP_UNAVAILABLE", "ERRNO_PARSE", "ERRNO_NETWORK", "ERRNO_UNKNOWN_ERROR", "OAUTH_SERVER_ERRNO_OFFSET", "ERRNO_UNKNOWN_CLIENT_ID", "ERRNO_INCORRECT_CLIENT_SECRET", "ERRNO_INCORRECT_REDIRECT_URI", "ERRNO_INVALID_FXA_ASSERTION", "ERRNO_UNKNOWN_CODE", "ERRNO_INCORRECT_CODE", "ERRNO_EXPIRED_CODE", "ERRNO_OAUTH_INVALID_TOKEN", "ERRNO_INVALID_REQUEST_PARAM", "ERRNO_INVALID_RESPONSE_TYPE", "ERRNO_UNAUTHORIZED", "ERRNO_FORBIDDEN", "ERRNO_INVALID_CONTENT_TYPE", "ERROR_ACCOUNT_ALREADY_EXISTS", "ERROR_ACCOUNT_DOES_NOT_EXIST", "ERROR_ACCOUNT_LOCKED", "ERROR_ACCOUNT_UNLOCKED", "ERROR_ALREADY_SIGNED_IN_USER", "ERROR_DEVICE_SESSION_CONFLICT", "ERROR_ENDPOINT_NO_LONGER_SUPPORTED", "ERROR_INCORRECT_API_VERSION", "ERROR_INCORRECT_EMAIL_CASE", "ERROR_INCORRECT_KEY_RETRIEVAL_METHOD", "ERROR_INCORRECT_LOGIN_METHOD", "ERROR_INVALID_EMAIL", "ERROR_INVALID_AUDIENCE", "ERROR_INVALID_AUTH_TOKEN", "ERROR_INVALID_AUTH_TIMESTAMP", "ERROR_INVALID_AUTH_NONCE", "ERROR_INVALID_BODY_PARAMETERS", "ERROR_INVALID_PASSWORD", "ERROR_INVALID_VERIFICATION_CODE", "ERROR_INVALID_REFRESH_AUTH_VALUE", "ERROR_INVALID_REQUEST_SIGNATURE", "ERROR_INTERNAL_INVALID_USER", "ERROR_MISSING_BODY_PARAMETERS", "ERROR_MISSING_CONTENT_LENGTH", "ERROR_NO_TOKEN_SESSION", "ERROR_NO_SILENT_REFRESH_AUTH", "ERROR_NOT_VALID_JSON_BODY", "ERROR_OFFLINE", "ERROR_PERMISSION_DENIED", "ERROR_REQUEST_BODY_TOO_LARGE", "ERROR_SERVER_ERROR", "ERROR_SYNC_DISABLED", "ERROR_TOO_MANY_CLIENT_REQUESTS", "ERROR_SERVICE_TEMP_UNAVAILABLE", "ERROR_UI_ERROR", "ERROR_UI_REQUEST", "ERROR_PARSE", "ERROR_NETWORK", "ERROR_UNKNOWN", "ERROR_UNKNOWN_DEVICE", "ERROR_UNVERIFIED_ACCOUNT", "ERROR_UNKNOWN_CLIENT_ID", "ERROR_INCORRECT_CLIENT_SECRET", "ERROR_INCORRECT_REDIRECT_URI", "ERROR_INVALID_FXA_ASSERTION", "ERROR_UNKNOWN_CODE", "ERROR_INCORRECT_CODE", "ERROR_EXPIRED_CODE", "ERROR_OAUTH_INVALID_TOKEN", "ERROR_INVALID_REQUEST_PARAM", "ERROR_INVALID_RESPONSE_TYPE", "ERROR_UNAUTHORIZED", "ERROR_FORBIDDEN", "ERROR_INVALID_CONTENT_TYPE", "ERROR_NO_ACCOUNT", "ERROR_AUTH_ERROR", "ERROR_INVALID_PARAMETER", "ERROR_CODE_METHOD_NOT_ALLOWED", "ERROR_MSG_METHOD_NOT_ALLOWED", "FXA_PWDMGR_PLAINTEXT_FIELDS", "FXA_PWDMGR_SECURE_FIELDS", "FXA_PWDMGR_MEMORY_FIELDS", "FXA_PWDMGR_REAUTH_WHITELIST", "FXA_PWDMGR_HOST", "FXA_PWDMGR_REALM", "SERVER_ERRNO_TO_ERROR", "ERROR_TO_GENERAL_ERROR_CLASS"],
   "FxAccountsOAuthGrantClient.jsm": ["FxAccountsOAuthGrantClient", "FxAccountsOAuthGrantClientError"],
   "FxAccountsProfileClient.jsm": ["FxAccountsProfileClient", "FxAccountsProfileClientError"],
   "FxAccountsPush.js": ["FxAccountsPushService"],
   "FxAccountsStorage.jsm": ["FxAccountsStorageManagerCanStoreField", "FxAccountsStorageManager"],
   "FxAccountsWebChannel.jsm": ["EnsureFxAccountsWebChannel"],
   "gDevTools.jsm": ["gDevTools", "gDevToolsBrowser"],
   "gDevTools.jsm": ["gDevTools", "gDevToolsBrowser"],
   "Geometry.jsm": ["Point", "Rect"],