Bug 1373563 - Skip the content blocking intro in mozscreenshots for ControlCenter images. r=johannh
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Wed, 17 Oct 2018 14:44:53 +0000
changeset 500150 30a7005f36e433c8bfe8b0938e996a60f2618731
parent 500149 20a82622d638d03b4d4c63e7613129c4bbc54893
child 500151 fe67b30d8534c6a843ea7cc8a496abc2b5a506b9
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1373563
milestone64.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 1373563 - Skip the content blocking intro in mozscreenshots for ControlCenter images. r=johannh Differential Revision: https://phabricator.services.mozilla.com/D8814
browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
@@ -284,17 +284,17 @@ var TestRunner = {
         false,
         `Skipped configuration ` +
         `[ ${combo.map((e) => e.name).join(", ")} ] for failure in ` +
         `${config.name}.${func}: ${todo}`);
     } else {
       this.mochitestScope.info(
         `\tSkipped configuration ` +
         `[ ${combo.map((e) => e.name).join(", ")} ] ` +
-        `for "${reason}" in  ${config.name}.${func}`);
+        `for "${reason}" in ${config.name}.${func}`);
     }
   },
 
   async _performCombo(combo) {
     let paddedComboIndex = padLeft(this.currentComboIndex + 1, String(this.combos.length).length);
     this.mochitestScope.info(
       `Combination ${paddedComboIndex}/${this.combos.length}: ${this._comboName(combo).substring(1)}`
     );
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
@@ -21,17 +21,21 @@ const HTTPS_PAGE = "https://example.com/
 const PERMISSIONS_PAGE = "https://test1.example.com/";
 const HTTP_PASSWORD_PAGE = `http://test2.example.org/${RESOURCE_PATH}/password.html`;
 const MIXED_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed.html`;
 const MIXED_ACTIVE_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed_active.html`;
 const MIXED_PASSIVE_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed_passive.html`;
 const TRACKING_PAGE = `http://tracking.example.org/${RESOURCE_PATH}/tracking.html`;
 
 var ControlCenter = {
-  init(libDir) { },
+  init(libDir) {
+    // Disable the FTU tours.
+    Services.prefs.setIntPref("privacy.trackingprotection.introCount", 20);
+    Services.prefs.setIntPref("browser.contentblocking.introCount", 20);
+  },
 
   configurations: {
     about: {
       selectors: ["#identity-popup"],
       async applyConfig() {
         await loadPage("about:rights");
         await openIdentityPopup();
       },
@@ -213,31 +217,29 @@ var ControlCenter = {
         await openIdentityPopup();
       },
     },
 
     trackingProtectionEnabled: {
       selectors: ["#identity-popup"],
       async applyConfig() {
         Services.prefs.setBoolPref("privacy.trackingprotection.enabled", true);
-        Services.prefs.setIntPref("privacy.trackingprotection.introCount", 20);
         await UrlClassifierTestUtils.addTestTrackers();
 
         await loadPage(TRACKING_PAGE);
         await openIdentityPopup();
       },
     },
 
     trackingProtectionDisabled: {
       selectors: ["#identity-popup"],
       async applyConfig() {
         let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
         let gBrowser = browserWindow.gBrowser;
         Services.prefs.setBoolPref("privacy.trackingprotection.enabled", true);
-        Services.prefs.setIntPref("privacy.trackingprotection.introCount", 20);
         await UrlClassifierTestUtils.addTestTrackers();
 
         await loadPage(TRACKING_PAGE);
         await openIdentityPopup();
         // unblock the page
         gBrowser.ownerGlobal.document.querySelector("#tracking-action-unblock").click();
         await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, TRACKING_PAGE);
         await openIdentityPopup();