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 340291 3485c8d6959b412331ba72af453b6184f9ddf718
parent 340290 231dfddf9f259331000f5ff68d15be7bebc2f168
child 340292 5f8667738b0b9340c13d4f81732e95df157fb60b
push id6291
push userkwierso@gmail.com
push dateFri, 12 Aug 2016 22:34:55 +0000
treeherdermozilla-beta@cc0621428055 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer, lizzard
bugs1288178
milestone49.0
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;
 }