Bug 1034731 - Better logging for manifest content-type errors. r=fabrice

This commit is contained in:
Marco Castelluccio 2014-07-06 18:47:28 +02:00
parent dfb3976d54
commit e8e1264391
3 changed files with 4 additions and 4 deletions

View File

@ -2135,7 +2135,7 @@ this.DOMApplicationRegistry = {
if (xhr.status == 200) {
if (!AppsUtils.checkManifestContentType(app.installOrigin, app.origin,
xhr.getResponseHeader("content-type"))) {
sendError("INVALID_MANIFEST");
sendError("INVALID_MANIFEST_CONTENT_TYPE");
return;
}
@ -2235,7 +2235,7 @@ this.DOMApplicationRegistry = {
if (xhr.status == 200) {
if (!AppsUtils.checkManifestContentType(app.installOrigin, app.origin,
xhr.getResponseHeader("content-type"))) {
sendError("INVALID_MANIFEST");
sendError("INVALID_MANIFEST_CONTENT_TYPE");
return;
}

View File

@ -110,7 +110,7 @@ var steps = [
var miniManifestURL = PackagedTestHelper.gSJS +
"?getManifest=true" +
"&noManifestContentType=true";
checkAppInstallError(miniManifestURL, "INVALID_MANIFEST");
checkAppInstallError(miniManifestURL, "INVALID_MANIFEST_CONTENT_TYPE");
},
function() {
// Test mini-manifest 'size' value is not number. Bug 839435.

View File

@ -91,7 +91,7 @@ function invalidContent(next) {
var request = navigator.mozApps.install(url, null);
request.onerror = function onInstallError() {
is(this.error.name, "INVALID_MANIFEST", "manifest with bad content type");
is(this.error.name, "INVALID_MANIFEST_CONTENT_TYPE", "manifest with bad content type");
next();
};