Backed out changeset afe70927277c (bug 1330014) for xpcshell test_storage_manager.js failures

This commit is contained in:
Iris Hsiao 2017-01-13 11:06:38 +08:00
Родитель 3a2f71af0e
Коммит 303147b9fa
8 изменённых файлов: 29 добавлений и 6 удалений

Просмотреть файл

@ -102,7 +102,7 @@ RESTRequest.prototype = {
Ci.nsIChannelEventSink
]),
/** Public API: **/
/** * Public API: ***/
/**
* A constant boolean that indicates whether this object will automatically
@ -293,7 +293,7 @@ RESTRequest.prototype = {
}
},
/** Implementation stuff **/
/** * Implementation stuff ***/
dispatch: function dispatch(method, data, onComplete, onProgress) {
if (this.status != this.NOT_SENT) {
@ -412,7 +412,7 @@ RESTRequest.prototype = {
this.onComplete(error);
},
/** nsIStreamListener **/
/** * nsIStreamListener ***/
onStartRequest: function onStartRequest(channel) {
if (this.status == this.ABORTED) {
@ -573,13 +573,13 @@ RESTRequest.prototype = {
this.delayTimeout();
},
/** nsIInterfaceRequestor **/
/** * nsIInterfaceRequestor ***/
getInterface(aIID) {
return this.QueryInterface(aIID);
},
/** nsIBadCertListener2 **/
/** * nsIBadCertListener2 ***/
notifyCertProblem: function notifyCertProblem(socketInfo, sslStatus, targetHost) {
this._log.warn("Invalid HTTPS certificate encountered!");
@ -601,7 +601,7 @@ RESTRequest.prototype = {
return isInternal && isSameURI;
},
/** nsIChannelEventSink **/
/** * nsIChannelEventSink ***/
asyncOnChannelRedirect:
function asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {

Просмотреть файл

@ -312,6 +312,7 @@ add_task(function* test_retry_request_on_fail() {
let message = "i love you!!!";
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(message, message.length);
}
});
@ -460,6 +461,7 @@ add_task(function* test_401_then_500() {
let message = "Cannot get ye flask.";
response.setStatusLine(request.httpVersion, 500, "Internal server error");
response.bodyOutputStream.write(message, message.length);
}
});

Просмотреть файл

@ -75,6 +75,7 @@ add_test(function test_intl_accept_language() {
do_print("Checked " + testCount + " languages. Removing checkLanguagePref as pref observer.");
Services.prefs.removeObserver("intl.accept_languages", checkLanguagePref);
run_next_test();
});
}
});

Просмотреть файл

@ -279,22 +279,26 @@ add_task(function* test_signIn() {
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(sessionMessage_noKey,
sessionMessage_noKey.length);
} else if (jsonBody.email == "you@example.com") {
do_check_eq("keys=true", request._queryString);
do_check_eq(jsonBody.authPW, "93d20ec50304d496d0707ec20d7e8c89459b6396ec5dd5b9e92809c5e42856c7");
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(sessionMessage_withKey,
sessionMessage_withKey.length);
} else if (jsonBody.email == "You@example.com") {
// Error trying to sign in with a wrong capitalization
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage_wrongCap,
errorMessage_wrongCap.length);
} else {
// Error trying to sign in to nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage_notExistent,
errorMessage_notExistent.length);
}
},
});
@ -350,6 +354,7 @@ add_task(function* test_signOut() {
// Error trying to sign out of nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});
@ -388,6 +393,7 @@ add_task(function* test_recoveryEmailStatus() {
// Second call gets an error trying to query a nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});
@ -416,6 +422,7 @@ add_task(function* test_recoveryEmailStatusWithReason() {
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(emailStatus, emailStatus.length);
},
});
@ -445,6 +452,7 @@ add_task(function* test_resendVerificationEmail() {
// Second call gets an error trying to query a nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});
@ -567,6 +575,7 @@ add_task(function* test_signCertificate() {
// Second attempt, trigger error
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});

Просмотреть файл

@ -493,6 +493,7 @@ AddonUtilsInternal.prototype = {
if (!addon.appDisabled) {
cb(null, addon);
}
// Else the listener will handle invoking the callback.
},

Просмотреть файл

@ -250,6 +250,7 @@ Tracker.prototype = {
if (data == PREFS_BRANCH + "engine." + this.engine.prefName) {
this.onEngineEnabledChanged(this.engine.enabled);
}
}
}
};

Просмотреть файл

@ -135,10 +135,13 @@ UserAPI10Client.prototype = {
let body = request.response.body;
if (body == "0") {
cb(null, false);
} else if (body == "1") {
cb(null, true);
} else {
cb(new Error("Unknown response from server: " + body), null);
}
},
@ -175,6 +178,7 @@ UserAPI10Client.prototype = {
}
cb(error, null);
},
_onChangePassword: function _onChangePassword(cb, request, error) {
@ -214,6 +218,7 @@ UserAPI10Client.prototype = {
error.body = response.body;
cb(error, null);
},
};
Object.freeze(UserAPI10Client.prototype);

Просмотреть файл

@ -572,8 +572,10 @@ var TPS = {
Logger.logInfo("mozmill endTest: " + JSON.stringify(obj));
if (obj.failed > 0) {
this.DumpError('mozmill test failed, name: ' + obj.name + ', reason: ' + JSON.stringify(obj.fails));
} else if ('skipped' in obj && obj.skipped) {
this.DumpError('mozmill test failed, name: ' + obj.name + ', reason: ' + obj.skipped_reason);
} else {
Utils.namedTimer(function() {
this.FinishAsyncOperation();
@ -883,6 +885,7 @@ var TPS = {
Utils.nextTick(this._executeTestPhase.bind(this, file, phase, settings));
} catch (e) {
this.DumpError("RunTestPhase failed", e);
}
},
@ -945,6 +948,7 @@ var TPS = {
this._currentAction = 0;
} catch (e) {
this.DumpError("_executeTestPhase failed", e);
}
},