diff --git a/build/pgo/certs/cert8.db b/build/pgo/certs/cert8.db index 2fad36b23bb..cedf66bb581 100644 Binary files a/build/pgo/certs/cert8.db and b/build/pgo/certs/cert8.db differ diff --git a/build/pgo/certs/key3.db b/build/pgo/certs/key3.db index aa24aa98688..1eac5662188 100644 Binary files a/build/pgo/certs/key3.db and b/build/pgo/certs/key3.db differ diff --git a/build/pgo/server-locations.txt b/build/pgo/server-locations.txt index dd78c50a6be..db46ea2db16 100644 --- a/build/pgo/server-locations.txt +++ b/build/pgo/server-locations.txt @@ -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 diff --git a/dom/apps/tests/marketplace/marketplace_dev_app.webapp b/dom/apps/tests/marketplace/marketplace_dev_app.webapp new file mode 100644 index 00000000000..5d4733676e2 --- /dev/null +++ b/dom/apps/tests/marketplace/marketplace_dev_app.webapp @@ -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"}} diff --git a/dom/apps/tests/marketplace/marketplace_dev_app.webapp^headers^ b/dom/apps/tests/marketplace/marketplace_dev_app.webapp^headers^ new file mode 100644 index 00000000000..a2367b11c78 --- /dev/null +++ b/dom/apps/tests/marketplace/marketplace_dev_app.webapp^headers^ @@ -0,0 +1 @@ +Content-Type: application/x-web-app-manifest+json diff --git a/dom/apps/tests/marketplace/marketplace_dev_app.zip b/dom/apps/tests/marketplace/marketplace_dev_app.zip new file mode 100644 index 00000000000..01bdead2f12 Binary files /dev/null and b/dom/apps/tests/marketplace/marketplace_dev_app.zip differ diff --git a/dom/apps/tests/marketplace/marketplace_dev_privileged_app.webapp b/dom/apps/tests/marketplace/marketplace_dev_privileged_app.webapp new file mode 100644 index 00000000000..43b501753d0 --- /dev/null +++ b/dom/apps/tests/marketplace/marketplace_dev_privileged_app.webapp @@ -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"}} diff --git a/dom/apps/tests/marketplace/marketplace_dev_privileged_app.webapp^headers^ b/dom/apps/tests/marketplace/marketplace_dev_privileged_app.webapp^headers^ new file mode 100644 index 00000000000..a2367b11c78 --- /dev/null +++ b/dom/apps/tests/marketplace/marketplace_dev_privileged_app.webapp^headers^ @@ -0,0 +1 @@ +Content-Type: application/x-web-app-manifest+json diff --git a/dom/apps/tests/marketplace/marketplace_dev_privileged_app.zip b/dom/apps/tests/marketplace/marketplace_dev_privileged_app.zip new file mode 100644 index 00000000000..22ff6bae619 Binary files /dev/null and b/dom/apps/tests/marketplace/marketplace_dev_privileged_app.zip differ diff --git a/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.webapp b/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.webapp new file mode 100644 index 00000000000..62c436786b4 --- /dev/null +++ b/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.webapp @@ -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"}} diff --git a/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.webapp^headers^ b/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.webapp^headers^ new file mode 100644 index 00000000000..a2367b11c78 --- /dev/null +++ b/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.webapp^headers^ @@ -0,0 +1 @@ +Content-Type: application/x-web-app-manifest+json diff --git a/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.zip b/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.zip new file mode 100644 index 00000000000..9c2fbe16c50 Binary files /dev/null and b/dom/apps/tests/marketplace/marketplace_dev_reviewers_app.zip differ diff --git a/dom/apps/tests/test_marketplace_pkg_install.html b/dom/apps/tests/test_marketplace_pkg_install.html index 80ec1283085..85d45405145 100644 --- a/dom/apps/tests/test_marketplace_pkg_install.html +++ b/dom/apps/tests/test_marketplace_pkg_install.html @@ -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(); }