mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927108 - Fix certified app actor installation r=paul
This commit is contained in:
parent
c3f151ba9c
commit
3ff98d25f0
@ -14,7 +14,9 @@ MOCHITEST_DATA_FILES = \
|
||||
data/app-redirect.zip \
|
||||
data/app-updated.zip \
|
||||
data/app.zip \
|
||||
data/app-certified.zip \
|
||||
$(NULL)
|
||||
|
||||
MOCHITEST_DATA_DEST = $(MOCHITEST_DEST)/data
|
||||
INSTALL_TARGETS += MOCHITEST_DATA
|
||||
endif
|
||||
|
BIN
toolkit/devtools/apps/tests/data/app-certified.zip
Normal file
BIN
toolkit/devtools/apps/tests/data/app-certified.zip
Normal file
Binary file not shown.
@ -154,6 +154,26 @@ var steps = [
|
||||
}
|
||||
);
|
||||
},
|
||||
function() {
|
||||
ok(true, "== TEST == Install certified app");
|
||||
let appId = "test-certified-id";
|
||||
let url = SimpleTest.getTestFileURL("data/app-certified.zip");
|
||||
installTestApp(url, appId,
|
||||
function (aResponse, aApp) {
|
||||
ok(true, "Installed");
|
||||
is(aResponse.appId, appId, "Got same app id");
|
||||
if ("error" in aResponse) {
|
||||
ok(false, "Error: " + aResponse.error);
|
||||
}
|
||||
if ("message" in aResponse) {
|
||||
ok(false, "Error message: " + aResponse.message);
|
||||
}
|
||||
ok(!("error" in aResponse), "app installed without any error");
|
||||
is(aApp.manifest.name, "Certified app", "app name is correct");
|
||||
next();
|
||||
}
|
||||
);
|
||||
},
|
||||
function() {
|
||||
ok(true, "all done!\n");
|
||||
mm.sendAsyncMessage("cleanup");
|
||||
|
@ -389,13 +389,6 @@ WebappsActor.prototype = {
|
||||
|
||||
let appType = self._getAppType(manifest.type);
|
||||
|
||||
// In production builds, don't allow installation of certified apps.
|
||||
if (!DOMApplicationRegistry.allowSideloadingCertified &&
|
||||
appType == Ci.nsIPrincipal.APP_STATUS_CERTIFIED) {
|
||||
self._sendError(deferred, "Installing certified apps is not allowed.", aId);
|
||||
return;
|
||||
}
|
||||
|
||||
// Privileged and certified packaged apps can setup a custom origin
|
||||
// via `origin` manifest property
|
||||
let id = aId;
|
||||
|
Loading…
Reference in New Issue
Block a user