mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Backed out changeset e6177d883f37 (bug 1359540) for eslint failures
This commit is contained in:
parent
0c2aa823c9
commit
8cb9279791
@ -1,11 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
"plugin:mozilla/recommended"
|
||||
],
|
||||
|
||||
plugins: [
|
||||
"mozilla"
|
||||
]
|
||||
}
|
@ -511,7 +511,7 @@ this.CryptoUtils = {
|
||||
artifacts.hash = hash_b64;
|
||||
}
|
||||
|
||||
let requestString = ("hawk.1.header\n" +
|
||||
let requestString = ("hawk.1.header" + "\n" +
|
||||
artifacts.ts.toString(10) + "\n" +
|
||||
artifacts.nonce + "\n" +
|
||||
artifacts.method + "\n" +
|
||||
|
@ -465,7 +465,7 @@ this.FxAccountsManager = {
|
||||
let client = this._getFxAccountsClient();
|
||||
return client.accountExists(aEmail).then(
|
||||
result => {
|
||||
log.debug("Account " + (result ? "" : "does not ") + "exists");
|
||||
log.debug("Account " + result ? "" : "does not" + " exists");
|
||||
let error = this._getError(result);
|
||||
if (error) {
|
||||
return this._error(error, result);
|
||||
|
@ -38,11 +38,11 @@ let MockStorage = function() {
|
||||
this.data = null;
|
||||
};
|
||||
MockStorage.prototype = Object.freeze({
|
||||
set(contents) {
|
||||
set: function (contents) {
|
||||
this.data = contents;
|
||||
return Promise.resolve(null);
|
||||
},
|
||||
get() {
|
||||
get: function () {
|
||||
return Promise.resolve(this.data);
|
||||
},
|
||||
getOAuthTokens() {
|
||||
@ -57,7 +57,7 @@ function MockFxAccounts() {
|
||||
return new FxAccounts({
|
||||
_now_is: new Date(),
|
||||
|
||||
now() {
|
||||
now: function() {
|
||||
return this._now_is;
|
||||
},
|
||||
|
||||
@ -113,17 +113,18 @@ function runTest() {
|
||||
ok(false, JSON.stringify(signInError));
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["identity.fxaccounts.enabled", true], // fx accounts
|
||||
["identity.fxaccounts.auth.uri", TEST_SERVER], // our sjs server
|
||||
["browser.dom.window.dump.enabled", true],
|
||||
]},
|
||||
function() { runTest(); }
|
||||
function () { runTest(); }
|
||||
);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -381,7 +381,7 @@ class BookmarkRepairRequestor extends CollectionRepairRequestor {
|
||||
case STATE.FINISHED:
|
||||
break;
|
||||
|
||||
case STATE.NOT_REPAIRING:
|
||||
case NOT_REPAIRING:
|
||||
// No repair is in progress. This is a common case, so only log trace.
|
||||
log.trace("continue repairs called but no repair in progress.");
|
||||
break;
|
||||
@ -667,16 +667,18 @@ class BookmarkRepairResponder extends CollectionRepairResponder {
|
||||
log.debug(`repair request to upload item '${id}' but it isn't under a syncable root; writing a tombstone`);
|
||||
toDelete.add(id);
|
||||
}
|
||||
// The item wasn't explicitly requested - only upload if it is syncable
|
||||
// and doesn't exist on the server.
|
||||
} else if (syncable && !existRemotely.has(id)) {
|
||||
log.debug(`repair request found related item '${id}' which isn't on the server; uploading`);
|
||||
toUpload.add(id);
|
||||
} else if (!syncable && existRemotely.has(id)) {
|
||||
log.debug(`repair request found non-syncable related item '${id}' on the server; writing a tombstone`);
|
||||
toDelete.add(id);
|
||||
} else {
|
||||
log.debug(`repair request found related item '${id}' which we will not upload; ignoring`);
|
||||
// The item wasn't explicitly requested - only upload if it is syncable
|
||||
// and doesn't exist on the server.
|
||||
if (syncable && !existRemotely.has(id)) {
|
||||
log.debug(`repair request found related item '${id}' which isn't on the server; uploading`);
|
||||
toUpload.add(id);
|
||||
} else if (!syncable && existRemotely.has(id)) {
|
||||
log.debug(`repair request found non-syncable related item '${id}' on the server; writing a tombstone`);
|
||||
toDelete.add(id);
|
||||
} else {
|
||||
log.debug(`repair request found related item '${id}' which we will not upload; ignoring`);
|
||||
}
|
||||
}
|
||||
}
|
||||
return { toUpload, toDelete };
|
||||
|
@ -386,8 +386,6 @@ class BookmarkValidator {
|
||||
* the fields describing client/server relationship will not have been filled
|
||||
* out yet.
|
||||
*/
|
||||
// XXX This should be split up and the complexity reduced.
|
||||
// eslint-disable-next-line complexity
|
||||
async inspectServerRecords(serverRecords) {
|
||||
let deletedItemIds = new Set();
|
||||
let idToRecord = new Map();
|
||||
@ -681,8 +679,6 @@ class BookmarkValidator {
|
||||
* - problemData is the same as for inspectServerRecords, except all properties
|
||||
* will be filled out.
|
||||
*/
|
||||
// XXX This should be split up and the complexity reduced.
|
||||
// eslint-disable-next-line complexity
|
||||
async compareServerWithClient(serverRecords, clientTree) {
|
||||
|
||||
let clientRecords = await this.createClientRecordsFromTree(clientTree);
|
||||
|
@ -697,5 +697,4 @@ class SyncTelemetryImpl {
|
||||
|
||||
}
|
||||
|
||||
/* global SyncTelemetry */
|
||||
this.SyncTelemetry = new SyncTelemetryImpl(ENGINES);
|
||||
|
@ -485,8 +485,6 @@ Utils.getDefaultDeviceName = function() {
|
||||
};
|
||||
|
||||
function registerRotaryEngine() {
|
||||
let {RotaryEngine} =
|
||||
Cu.import("resource://testing-common/services/sync/rotaryengine.js", {});
|
||||
Service.engineManager.clear();
|
||||
|
||||
Service.engineManager.register(RotaryEngine);
|
||||
|
@ -313,6 +313,9 @@ add_task(async function test_repair_client_missing() {
|
||||
let server = serverForFoo(bookmarksEngine);
|
||||
await SyncTestingInfrastructure(server);
|
||||
|
||||
let user = server.user("foo");
|
||||
|
||||
let initialID = Service.clientsEngine.localID;
|
||||
let remoteID = Utils.makeGUID();
|
||||
try {
|
||||
|
||||
@ -384,6 +387,7 @@ add_task(async function test_repair_server_missing() {
|
||||
|
||||
let user = server.user("foo");
|
||||
|
||||
let initialID = Service.clientsEngine.localID;
|
||||
let remoteID = Utils.makeGUID();
|
||||
try {
|
||||
|
||||
@ -446,6 +450,9 @@ add_task(async function test_repair_server_deleted() {
|
||||
let server = serverForFoo(bookmarksEngine);
|
||||
await SyncTestingInfrastructure(server);
|
||||
|
||||
let user = server.user("foo");
|
||||
|
||||
let initialID = Service.clientsEngine.localID;
|
||||
let remoteID = Utils.makeGUID();
|
||||
try {
|
||||
|
||||
|
@ -791,6 +791,7 @@ add_task(async function test_clients_not_in_fxa_list() {
|
||||
let server = serverForFoo(engine);
|
||||
await SyncTestingInfrastructure(server);
|
||||
|
||||
let user = server.user("foo");
|
||||
let remoteId = Utils.makeGUID();
|
||||
let remoteId2 = Utils.makeGUID();
|
||||
|
||||
|
@ -273,6 +273,7 @@ add_test(function test_noNewFailed_noErrorLog() {
|
||||
Svc.Prefs.set("log.appender.file.logOnError", true);
|
||||
Svc.Prefs.set("log.appender.file.logOnSuccess", false);
|
||||
|
||||
let log = Log.repository.getLogger("Sync.Test.FileLog");
|
||||
Svc.Obs.add("weave:service:reset-file-log", function onResetFileLog() {
|
||||
Svc.Obs.remove("weave:service:reset-file-log", onResetFileLog);
|
||||
// No log file was written.
|
||||
|
@ -38,7 +38,7 @@
|
||||
"collection_repair.js": ["getRepairRequestor", "getAllRepairRequestors", "CollectionRepairRequestor", "getRepairResponder", "CollectionRepairResponder"],
|
||||
"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", "DEFAULT_MAX_RECORD_PAYLOAD_BYTES", "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.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"],
|
||||
|
Loading…
Reference in New Issue
Block a user