Bug 1288178 - add Test Pilot to mozAddonManager allow list r?rhelmer
MozReview-Commit-ID: Klx75vFhKUI
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -62,20 +62,21 @@ const PREF_EM_CHECK_COMPATIBILITY_BASE =
var PREF_EM_CHECK_COMPATIBILITY = MOZ_COMPATIBILITY_NIGHTLY ?
PREF_EM_CHECK_COMPATIBILITY_BASE + ".nightly" :
undefined;
const TOOLKIT_ID = "toolkit@mozilla.org";
const VALID_TYPES_REGEXP = /^[\w\-]+$/;
-const WEBAPI_INSTALL_HOSTS = ["addons.mozilla.org", "addons.cdn.mozilla.net"];
+const WEBAPI_INSTALL_HOSTS = ["addons.mozilla.org", "addons.cdn.mozilla.net", "testpilot.firefox.com"];
const WEBAPI_TEST_INSTALL_HOSTS = [
"addons.allizom.org", "addons-stage-cdn.allizom.org",
"addons-dev.allizom.org", "addons-dev-cdn-allizom.org",
+ "testpilot.stage.mozaws.net", "testpilot.dev.mozaws.net",
"example.com",
];
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/AsyncShutdown.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
--- a/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp
+++ b/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp
@@ -35,26 +35,29 @@ AddonManagerWebAPI::IsValidSite(nsIURI*
nsCString host;
rv = uri->GetHost(host);
if (NS_FAILED(rv)) {
return false;
}
if (host.Equals("addons.mozilla.org") ||
- host.Equals("discovery.addons.mozilla.org")) {
+ host.Equals("discovery.addons.mozilla.org") ||
+ host.Equals("testpilot.firefox.com")) {
return true;
}
// When testing allow access to the developer sites.
if (Preferences::GetBool("extensions.webapi.testing", false)) {
if (host.Equals("addons.allizom.org") ||
host.Equals("discovery.addons.allizom.org") ||
host.Equals("addons-dev.allizom.org") ||
host.Equals("discovery.addons-dev.allizom.org") ||
+ host.Equals("testpilot.stage.mozaws.net") ||
+ host.Equals("testpilot.dev.mozaws.net") ||
host.Equals("example.com")) {
return true;
}
}
return false;
}