Bug 1288178 - add Test Pilot to mozAddonManager allow list r=rhelmer
authorWil Clouser <wclouser@mozilla.com>
Tue, 09 Aug 2016 15:15:01 -0700
changeset 308860 b2085e633d1fef9a472f43d85758bee6b4d7670e
parent 308859 15d404ae1609b59cc09436df4f3a1ed46a57346d
child 308861 9bc47f02e32250f3736faa290f1f3c33e4c3c48e
push id80450
push usercbook@mozilla.com
push dateWed, 10 Aug 2016 14:03:25 +0000
treeherdermozilla-inbound@5a9ec27080fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs1288178
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288178 - add Test Pilot to mozAddonManager allow list r=rhelmer 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;
 }