Bug 1329262 - Enable compact themes in mozscreenshots;r=MattN
authorBrian Grinstead <bgrinstead@mozilla.com>
Thu, 19 Jan 2017 14:10:04 -0800
changeset 375212 018d06dd2851e88d036867b779f1247147e2d2e8
parent 375211 b17dbe9a53dfaad68fad738b3039904d948a9bec
child 375213 7159d52385062d380dcb944b6546a8f1ac225697
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1329262
milestone53.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 1329262 - Enable compact themes in mozscreenshots;r=MattN MozReview-Commit-ID: A574iIkQgkW
browser/tools/mozscreenshots/head.js
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm
browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js
--- a/browser/tools/mozscreenshots/head.js
+++ b/browser/tools/mozscreenshots/head.js
@@ -9,17 +9,19 @@
 const {AddonWatcher} = Cu.import("resource://gre/modules/AddonWatcher.jsm", {});
 const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);
 const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
 const EXTENSION_DIR = "chrome://mochitests/content/extensions/mozscreenshots/browser/";
 
 let TestRunner;
 
 function* setup() {
-  requestLongerTimeout(10);
+  // This timeout doesn't actually end the job even if it is hit - the buildbot timeout will
+  // handle things for us if the test actually hangs.
+  requestLongerTimeout(100);
 
   info("installing extension temporarily");
   let chromeURL = Services.io.newURI(EXTENSION_DIR);
   let dir = chromeRegistry.convertChromeURL(chromeURL).QueryInterface(Ci.nsIFileURL).file;
   yield AddonManager.installTemporaryAddon(dir);
 
   info("Checking for mozscreenshots extension");
   return new Promise((resolve) => {
deleted file mode 100644
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevEdition.jsm
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["DevEdition"];
-
-const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-const THEME_ID = "firefox-devedition@mozilla.org";
-
-Cu.import("resource://gre/modules/LightweightThemeManager.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-
-this.DevEdition = {
-  init(libDir) {},
-
-  configurations: {
-    devEditionLight: {
-      applyConfig: Task.async(() => {
-        Services.prefs.setCharPref("devtools.theme", "light");
-        LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(THEME_ID);
-        Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", true);
-      }),
-    },
-    devEditionDark: {
-      applyConfig: Task.async(() => {
-        Services.prefs.setCharPref("devtools.theme", "dark");
-        LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(THEME_ID);
-        Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", true);
-      }),
-    },
-    devEditionOff: {
-      applyConfig: Task.async(() => {
-        Services.prefs.clearUserPref("devtools.theme");
-        LightweightThemeManager.currentTheme = null;
-        Services.prefs.clearUserPref("browser.devedition.theme.showCustomizeButton");
-      }),
-    },
-  },
-};
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm
@@ -71,16 +71,27 @@ this.LightweightThemes = {
             resolve("lightLWT");
           }, 500);
         });
       },
 
       verifyConfig: verifyConfigHelper,
     },
 
+    compactLight: {
+      applyConfig: Task.async(() => {
+        LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-compact-light@mozilla.org");
+      }),
+    },
+
+    compactDark: {
+      applyConfig: Task.async(() => {
+        LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-compact-dark@mozilla.org");
+      }),
+    },
   },
 };
 
 
 function verifyConfigHelper() {
   return new Promise((resolve, reject) => {
     let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
     if (browserWindow.document.documentElement.hasAttribute("lwtheme")) {
--- a/browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js
+++ b/browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js
@@ -6,13 +6,11 @@
 
 "use strict";
 
 add_task(function* capture() {
   if (!shouldCapture()) {
     return;
   }
 
-  requestLongerTimeout(20);
-
   let sets = ["TabsInTitlebar", "Tabs", "WindowSize", "Toolbars", "LightweightThemes"];
   yield TestRunner.start(sets, "primaryUI");
 });