зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e64cd799b7b6 (bug 741526) for mochitest-4 orange.
This commit is contained in:
Родитель
5903ca16b1
Коммит
901bb21dd4
|
@ -184,14 +184,6 @@ this.AppsUtils = {
|
|||
return true;
|
||||
},
|
||||
|
||||
checkManifestContentType(installOrigin, webappOrigin, contentType) {
|
||||
if (installOrigin != webappOrigin && contentType != "application/x-web-app-manifest+json") {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether the manifest allows installs for the given origin.
|
||||
* @param object aManifest
|
||||
|
|
|
@ -105,11 +105,6 @@ WebappsRegistry.prototype = {
|
|||
|
||||
xhr.addEventListener("load", (function() {
|
||||
if (xhr.status == 200) {
|
||||
if (!AppsUtils.checkManifestContentType(installOrigin, this._getOrigin(aURL), xhr.getResponseHeader("content-type"))) {
|
||||
Services.DOMRequest.fireError(request, "INVALID_MANIFEST");
|
||||
return;
|
||||
}
|
||||
|
||||
let manifest;
|
||||
try {
|
||||
manifest = JSON.parse(xhr.responseText, installOrigin);
|
||||
|
@ -219,11 +214,6 @@ WebappsRegistry.prototype = {
|
|||
|
||||
xhr.addEventListener("load", (function() {
|
||||
if (xhr.status == 200) {
|
||||
if (!AppsUtils.checkManifestContentType(installOrigin, this._getOrigin(aURL), xhr.getResponseHeader("content-type"))) {
|
||||
Services.DOMRequest.fireError(request, "INVALID_MANIFEST");
|
||||
return;
|
||||
}
|
||||
|
||||
let manifest;
|
||||
try {
|
||||
manifest = JSON.parse(xhr.responseText, installOrigin);
|
||||
|
|
|
@ -97,7 +97,7 @@ function invalidContent(next) {
|
|||
};
|
||||
|
||||
request.onsuccess = function onInstall() {
|
||||
ok(false, "manifest with bad content type should fail");
|
||||
todo(false, "manifest with bad content type fails");
|
||||
this.result.uninstall().onsuccess = function onUninstall() {
|
||||
next();
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче