Bug 1490729 - Ensure that we send variation=0 for the TP UI on about:privatebrowsing. r=Gijs a=pascalc
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 12 Sep 2018 18:12:45 +0000
changeset 489853 08ffdcf76ece
parent 489852 808461b7530b
child 489854 6ad54436118a
push id9802
push userncsoregi@mozilla.com
push dateFri, 14 Sep 2018 19:50:13 +0000
treeherdermozilla-beta@dd935a08ff4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, pascalc
bugs1490729
milestone63.0
Bug 1490729 - Ensure that we send variation=0 for the TP UI on about:privatebrowsing. r=Gijs a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D5680
browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
--- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
+++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
@@ -64,17 +64,17 @@ document.addEventListener("DOMContentLoa
 
   document.getElementById("startTour").addEventListener("click", function() {
     RPMSendAsyncMessage("DontShowIntroPanelAgain");
   });
 
   let introURL = RPMGetFormatURLPref("privacy.trackingprotection.introURL");
   // If the CB UI is enabled, tell the tour page to show a different variation
   // that is updated to reflect the CB control center UI.
-  let variation = contentBlockingUIEnabled ? "?variation=1" : "";
+  let variation = "?variation=" + (contentBlockingUIEnabled ? "1" : "0");
 
   document.getElementById("startTour").setAttribute("href", introURL + variation);
 
   document.getElementById("learnMore").setAttribute("href",
     RPMGetFormatURLPref("app.support.baseURL") + "private-browsing");
 
   let tpToggle = document.getElementById("tpToggle");
   document.getElementById("tpButton").addEventListener("click", () => {
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
@@ -65,17 +65,17 @@ add_task(async function test_links() {
 
   await testLinkOpensTab({ win, tab,
     elementId: "learnMore",
     expectedUrl: "https://example.com/private-browsing",
   });
 
   await testLinkOpensUrl({ win, tab,
     elementId: "startTour",
-    expectedUrl: "https://example.com/tour",
+    expectedUrl: "https://example.com/tour?variation=0",
   });
 
   await BrowserTestUtils.closeWindow(win);
 });
 
 add_task(async function test_links_CB() {
   // Use full version and change the remote URLs to prevent network access.
   Services.prefs.setCharPref("app.support.baseURL", "https://example.com/");