Bug 1390874 - Add a hidpi test directory to emulate high screen resolution for browser_startup_images.js. r=florian
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 16 Aug 2017 15:33:14 +0200
changeset 429178 5534f9aff56be5ff944631f028951378bbbfaaf1
parent 429177 ef1641e40903ff5e6cff94f2a1d1a3188598e563
child 429179 0c4fb7fef02acd521d430455253f239e7b38e274
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1390874
milestone57.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 1390874 - Add a hidpi test directory to emulate high screen resolution for browser_startup_images.js. r=florian Also adds a warning that the test should only be used in debug mode. MozReview-Commit-ID: 6X8jSz5O2ue
browser/base/content/test/performance/browser.ini
browser/base/content/test/performance/browser_startup_images.js
browser/base/content/test/performance/hidpi/browser.ini
browser/base/content/test/performance/lowdpi/browser.ini
browser/base/moz.build
--- a/browser/base/content/test/performance/browser.ini
+++ b/browser/base/content/test/performance/browser.ini
@@ -1,18 +1,16 @@
 [DEFAULT]
 support-files =
   head.js
 [browser_appmenu_reflows.js]
 skip-if = asan || debug # Bug 1382809, bug 1369959
 [browser_startup.js]
 [browser_startup_content.js]
 skip-if = !e10s
-[browser_startup_images.js]
-skip-if = !debug
 [browser_tabclose_grow_reflows.js]
 [browser_tabclose_reflows.js]
 [browser_tabopen_reflows.js]
 [browser_tabopen_squeeze_reflows.js]
 [browser_tabstrip_overflow_underflow_reflows.js]
 [browser_tabswitch_reflows.js]
 [browser_toolbariconcolor_restyles.js]
 [browser_urlbar_keyed_search_reflows.js]
--- a/browser/base/content/test/performance/browser_startup_images.js
+++ b/browser/base/content/test/performance/browser_startup_images.js
@@ -37,17 +37,23 @@ const whitelist = [
   {
     file: "chrome://browser/skin/tracking-protection-16.svg#enabled",
     platforms: ["linux", "win", "macosx"],
   },
 
   {
     file: "chrome://browser/skin/tabbrowser/tabDragIndicator.png",
     hidpi: "chrome://browser/skin/tabbrowser/tabDragIndicator@2x.png",
-    platforms: ["linux", "win", "macosx"],
+    platforms: ["macosx"],
+  },
+
+  {
+    file: "chrome://browser/skin/tabbrowser/tabDragIndicator.png",
+    hidpi: "<not loaded>",
+    platforms: ["linux", "win"],
   },
 
   {
     file: "resource://gre-resources/loading-image.png",
     platforms: ["win", "macosx"],
     intermittentNotLoaded: ["win", "macosx"],
   },
   {
@@ -63,16 +69,20 @@ const whitelist = [
 
   {
     file: "chrome://global/skin/icons/resizer.png",
     platforms: ["win"],
   },
 ];
 
 add_task(async function() {
+  if (!AppConstants.DEBUG) {
+    ok(false, "You need to run this test on a debug build.");
+  }
+
   let startupRecorder = Cc["@mozilla.org/test/startuprecorder;1"].getService().wrappedJSObject;
   await startupRecorder.done;
 
   let data = startupRecorder.data.images;
   let filteredWhitelist = whitelist.filter(el => {
     return el.platforms.includes(AppConstants.platform);
   });
 
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/performance/hidpi/browser.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+prefs =
+  layout.css.devPixelsPerPx='2'
+
+[../browser_startup_images.js]
+skip-if = !debug || (os == 'win' && os_version == '6.1') # hidpi results in the toolbar overflowing on Win 7
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/performance/lowdpi/browser.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+prefs =
+  layout.css.devPixelsPerPx='1'
+
+[../browser_startup_images.js]
+skip-if = !debug
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -23,16 +23,18 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/captivePortal/browser.ini',
     'content/test/contextMenu/browser.ini',
     'content/test/forms/browser.ini',
     'content/test/general/browser.ini',
     'content/test/metaTags/browser.ini',
     'content/test/newtab/browser.ini',
     'content/test/pageinfo/browser.ini',
     'content/test/performance/browser.ini',
+    'content/test/performance/hidpi/browser.ini',
+    'content/test/performance/lowdpi/browser.ini',
     'content/test/permissions/browser.ini',
     'content/test/plugins/browser.ini',
     'content/test/popupNotifications/browser.ini',
     'content/test/popups/browser.ini',
     'content/test/referrer/browser.ini',
     'content/test/sidebar/browser.ini',
     'content/test/siteIdentity/browser.ini',
     'content/test/static/browser.ini',