mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1040179 - Test marketplace-dev certificates. r=fabrice
This commit is contained in:
parent
b74e67ea7b
commit
4da9c38f85
Binary file not shown.
Binary file not shown.
@ -215,3 +215,4 @@ http://example.fi:80 privileged
|
||||
|
||||
# Hosts for testing marketplace apps installations
|
||||
https://marketplace.firefox.com:443 privileged
|
||||
https://marketplace-dev.allizom.org:443 privileged
|
||||
|
1
dom/apps/tests/marketplace/marketplace_dev_app.webapp
Normal file
1
dom/apps/tests/marketplace/marketplace_dev_app.webapp
Normal file
@ -0,0 +1 @@
|
||||
{"name": "Flashlight (Linterna)", "icons": {"60": "/img/icons/mortar-60.png", "128": "/img/icons/mortar-128.png", "48": "/img/icons/mortar-48.png", "16": "/img/icons/mortar-16.png"}, "version": "3.0", "package_path": "marketplace_dev_app.zip", "size": 211752, "release_notes": "", "locales": {"es": {"description": "Una simple linterna que puedes utilizar en cualquier lugar sin conexi\u00f3n a internet y con opciones geniales: * Modo Linterna - * Modo Disco - * Modo Colores", "developer": {"url": "https://twitter.com/tecnowilliam", "name": "William Vargas"}}}, "developer": {"url": "https://twitter.com/tecnowilliam", "name": "William Vargas"}}
|
@ -0,0 +1 @@
|
||||
Content-Type: application/x-web-app-manifest+json
|
BIN
dom/apps/tests/marketplace/marketplace_dev_app.zip
Normal file
BIN
dom/apps/tests/marketplace/marketplace_dev_app.zip
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
{"name": "KitchenSink", "icons": {"128": "/img/icons/logo-128.png", "32": "/img/icons/logo-32.png", "64": "/img/icons/logo-64.png", "256": "/img/icons/logo-256.png", "16": "/img/icons/logo-16.png"}, "version": "0.2.2", "package_path": "marketplace_dev_privileged_app.zip", "size": 253433, "release_notes": "Fixed the browser API test and its documentation link.", "developer": {"url": "http://www.mozillalabs.com", "name": "Piotr Zalewa"}}
|
@ -0,0 +1 @@
|
||||
Content-Type: application/x-web-app-manifest+json
|
BIN
dom/apps/tests/marketplace/marketplace_dev_privileged_app.zip
Normal file
BIN
dom/apps/tests/marketplace/marketplace_dev_privileged_app.zip
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
{"name": "Test WebAPI Permissions", "icons": {"128": "/qalogo.png"}, "version": "1.8", "package_path": "marketplace_dev_reviewers_app.zip", "size": 18850, "release_notes": null, "developer": {"url": "http://jasondanielsmith.wordpress.com/", "name": "Mozilla QA"}}
|
@ -0,0 +1 @@
|
||||
Content-Type: application/x-web-app-manifest+json
|
BIN
dom/apps/tests/marketplace/marketplace_dev_reviewers_app.zip
Normal file
BIN
dom/apps/tests/marketplace/marketplace_dev_reviewers_app.zip
Normal file
Binary file not shown.
@ -31,6 +31,9 @@ let gExternalAppsPath = gExternalInstallOrigin + "tests/dom/apps/tests/marketpla
|
||||
let gMarketplaceInstallOrigin = "https://marketplace.firefox.com/";
|
||||
let gMarketplaceAppsPath = gMarketplaceInstallOrigin + "tests/dom/apps/tests/marketplace/";
|
||||
|
||||
let gMarketplaceDevInstallOrigin = "https://marketplace-dev.allizom.org/";
|
||||
let gMarketplaceDevAppsPath = gMarketplaceDevInstallOrigin + "tests/dom/apps/tests/marketplace/";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function checkAppOnInstallSuccess(aExpected) {
|
||||
@ -184,6 +187,73 @@ PackagedTestHelper.setSteps([
|
||||
checkAppOnInstallError("INVALID_SIGNATURE");
|
||||
installApp(gExternalInstallOrigin, gExternalAppsPath + "marketplace_reviewers_app.webapp");
|
||||
},
|
||||
function() {
|
||||
let signedAppOrigins = SpecialPowers.getCharPref("dom.mozApps.signed_apps_installable_from");
|
||||
signedAppOrigins = signedAppOrigins.concat("," + gMarketplaceDevInstallOrigin.slice(0,-1));
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
['dom.mozApps.signed_apps_installable_from', signedAppOrigins],
|
||||
["dom.mozApps.use_reviewer_certs", true],
|
||||
]
|
||||
}, PackagedTestHelper.next);
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Marketplace-dev packaged app from https://marketplace.firefox.com/");
|
||||
checkAppOnInstallError("INVALID_SIGNATURE");
|
||||
installApp(gMarketplaceInstallOrigin, gMarketplaceAppsPath + "marketplace_dev_app.webapp");
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Marketplace-dev packaged app from https://marketplace-dev.allizom.org/");
|
||||
let miniManifestURL = gMarketplaceDevAppsPath + "marketplace_dev_app.webapp";
|
||||
let expected = {
|
||||
name: "Flashlight (Linterna)",
|
||||
manifestURL: miniManifestURL,
|
||||
installOrigin: gMarketplaceDevInstallOrigin.slice(0, -1),
|
||||
progress: 0,
|
||||
installState: "installed",
|
||||
downloadAvailable: false,
|
||||
downloading: false,
|
||||
readyToApplyDownload: false,
|
||||
launch_path: "/index.html",
|
||||
version: "3.0",
|
||||
};
|
||||
checkAppOnInstallSuccess(expected);
|
||||
installApp(gMarketplaceDevInstallOrigin, miniManifestURL);
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Marketplace-dev privileged app from https://marketplace.firefox.com/");
|
||||
checkAppOnInstallError("INVALID_SIGNATURE");
|
||||
installApp(gMarketplaceInstallOrigin, gMarketplaceAppsPath + "marketplace_dev_privileged_app.webapp");
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Marketplace-dev privileged app from https://marketplace-dev.allizom.org/");
|
||||
let miniManifestURL = gMarketplaceDevAppsPath + "marketplace_dev_privileged_app.webapp";
|
||||
let expected = {
|
||||
name: "KitchenSink",
|
||||
manifestURL: miniManifestURL,
|
||||
installOrigin: gMarketplaceDevInstallOrigin.slice(0, -1),
|
||||
progress: 0,
|
||||
installState: "installed",
|
||||
downloadAvailable: false,
|
||||
downloading: false,
|
||||
readyToApplyDownload: false,
|
||||
launch_path: "/index.html",
|
||||
version: "0.2.2",
|
||||
};
|
||||
checkAppOnInstallSuccess(expected);
|
||||
installApp(gMarketplaceDevInstallOrigin, miniManifestURL);
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Marketplace-dev reviewers packaged app from https://marketplace.firefox.com/");
|
||||
checkAppOnInstallError("INVALID_SIGNATURE");
|
||||
installApp(gMarketplaceInstallOrigin, gMarketplaceAppsPath + "marketplace_dev_reviewers_app.webapp");
|
||||
},
|
||||
function() {
|
||||
info("== TEST == Marketplace-dev reviewers packaged app from https://marketplace-dev.allizom.org/");
|
||||
checkAppOnInstallError("INVALID_SIGNATURE");
|
||||
installApp(gMarketplaceDevInstallOrigin, gMarketplaceDevAppsPath + "marketplace_dev_reviewers_app.webapp");
|
||||
},
|
||||
function() {
|
||||
PackagedTestHelper.finish();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user