Bug 1345650 - use https://%(server)s/ for shield/self-support URLs to not break web-platform-tests on beta, and set shield-recipe-client.api_url to a working value in browser_RecipeRunner.js, a=test-only
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 26 Mar 2017 15:09:47 -0700
changeset 375940 44f6061a5dc639a61fdd43cd88b03bba475b1cb0
parent 375939 8b44c61e2e5a38f9d67c475834f4c16f0ae019a3
child 375941 659b949948787450acaf0466acea822f2cbfc169
push id11062
push userphilringnalda@gmail.com
push dateSun, 16 Apr 2017 19:27:25 +0000
treeherdermozilla-aurora@44f6061a5dc6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs1345650
milestone54.0a2
Bug 1345650 - use https://%(server)s/ for shield/self-support URLs to not break web-platform-tests on beta, and set shield-recipe-client.api_url to a working value in browser_RecipeRunner.js, a=test-only
browser/extensions/shield-recipe-client/test/browser/browser_RecipeRunner.js
testing/profiles/prefs_general.js
--- a/browser/extensions/shield-recipe-client/test/browser/browser_RecipeRunner.js
+++ b/browser/extensions/shield-recipe-client/test/browser/browser_RecipeRunner.js
@@ -122,16 +122,21 @@ add_task(function* checkFilter() {
   // Non-boolean filter results result in a true return value.
   ok(yield check("[1, 2, 3]"), "Non-boolean filter expressions return true");
 });
 
 add_task(function* testStart() {
   const getStub = sinon.stub(ClientEnvironment, "getClientClassification")
     .returns(Promise.resolve(false));
 
+  yield SpecialPowers.pushPrefEnv({set: [
+    ["extensions.shield-recipe-client.api_url",
+     "https://example.com/selfsupport-dummy/"],
+  ]});
+
   // When the experiment pref is false, eagerly call getClientClassification.
   yield SpecialPowers.pushPrefEnv({set: [
     ["extensions.shield-recipe-client.experiments.lazy_classify", false],
   ]});
   ok(!getStub.called, "getClientClassification hasn't been called");
   yield RecipeRunner.start();
   ok(getStub.called, "getClientClassfication was called eagerly");
 
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -298,18 +298,18 @@ user_pref("browser.uitour.url", "http://
 // Tell the search service we are running in the US.  This also has the desired
 // side-effect of preventing our geoip lookup.
 user_pref("browser.search.isUS", true);
 user_pref("browser.search.countryCode", "US");
 // This will prevent HTTP requests for region defaults.
 user_pref("browser.search.geoSpecificDefaults", false);
 
 // Make sure self support doesn't hit the network.
-user_pref("browser.selfsupport.url", "https://example.com/selfsupport-dummy/");
-user_pref("extensions.shield-recipe-client.api_url", "https://example.com/selfsupport-dummy/");
+user_pref("browser.selfsupport.url", "https://%(server)s/selfsupport-dummy/");
+user_pref("extensions.shield-recipe-client.api_url", "https://%(server)s/selfsupport-dummy/");
 
 user_pref("media.eme.enabled", true);
 
 user_pref("media.autoplay.enabled", true);
 
 // Don't use auto-enabled e10s
 user_pref("browser.tabs.remote.autostart.1", false);
 user_pref("browser.tabs.remote.autostart.2", false);