Bug 1288178 - add Test Pilot to mozAddonManager allow list r=rhelmer a=lizzard
authorWil Clouser <wclouser@mozilla.com>
Tue, 09 Aug 2016 15:15:01 -0700
changeset 401873 db7b2b88bfc8120219049376a156f12e72294db1
parent 401872 a63354e882d961197a8180712cb342f961f88817
child 401874 b74c428d8c96b92b308799ba7cf279d2b55e254e
push id26584
push userbmo:jgilbert@mozilla.com
push dateWed, 17 Aug 2016 19:34:22 +0000
reviewersrhelmer, lizzard
bugs1288178
milestone50.0a2
Bug 1288178 - add Test Pilot to mozAddonManager allow list r=rhelmer a=lizzard MozReview-Commit-ID: Klx75vFhKUI
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/AddonManagerWebAPI.cpp
--- 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;
 }