Bug 1390874 - Add a hidpi test directory to emulate high screen resolution for browser_startup_images.js. r=florian
☠☠ backed out by 530e399d9027 ☠ ☠
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 16 Aug 2017 15:33:14 +0200
changeset 375291 0a543fedee9ccbc58f857c89966e21d4376ef0ed
parent 375290 2652d716dd4d7a6ace5677c743e4d5367dff3d45
child 375292 11d08f128b4f961d5fb0d2c006163e3f61f2c9f4
push id32350
push usercbook@mozilla.com
push dateThu, 17 Aug 2017 11:02:43 +0000
treeherdermozilla-central@04bee69b3274 [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_search_reflows.js]
--- a/browser/base/content/test/performance/browser_startup_images.js
+++ b/browser/base/content/test/performance/browser_startup_images.js
@@ -63,17 +63,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"],
   },
   {
@@ -89,16 +95,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
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
@@ -19,16 +19,18 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/alerts/browser.ini',
     'content/test/captivePortal/browser.ini',
     'content/test/contextMenu/browser.ini',
     'content/test/forms/browser.ini',
     'content/test/general/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',