Bug 1397229 - Remove unused reflow from browser_windowopen_reflows.js on Windows, r?mconley draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 07 Sep 2017 11:38:51 -0400
changeset 666460 cec5bbf0d8a87129d59018d2e562ed9477345eff
parent 666274 ffe6cc09ccf38cca6f0e727837bbc6cb722d1e71
child 666461 f48c644a910a3c9153f2dbafe19f0bc8972f92a2
push id80415
push userahalberstadt@mozilla.com
push dateMon, 18 Sep 2017 19:36:54 +0000
reviewersmconley
bugs1397229
milestone57.0a1
Bug 1397229 - Remove unused reflow from browser_windowopen_reflows.js on Windows, r?mconley This test was previously skipped on Windows 8. This bug is migrating the test over to Windows 10 where we discovered the unused reflow. MozReview-Commit-ID: FqmgeKc1b9o
browser/base/content/test/performance/browser_windowopen_reflows.js
--- a/browser/base/content/test/performance/browser_windowopen_reflows.js
+++ b/browser/base/content/test/performance/browser_windowopen_reflows.js
@@ -63,22 +63,16 @@ if (Services.appinfo.OS == "WINNT") {
 
     {
       stack: [
         "handleEvent@chrome://browser/content/tabbrowser.xml",
         "inferFromText@chrome://browser/content/browser.js",
         "handleEvent@chrome://browser/content/browser.js",
       ],
     },
-
-    {
-      stack: [
-        "handleEvent@chrome://browser/content/tabbrowser.xml",
-      ],
-    }
   );
 }
 
 if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
   EXPECTED_REFLOWS.push(
     {
       stack: [
         "verticalMargins@chrome://browser/content/browser-tabsintitlebar.js",
@@ -96,27 +90,32 @@ if (Services.appinfo.OS == "WINNT" || Se
         "init@chrome://browser/content/browser-tabsintitlebar.js",
         "handleEvent@chrome://browser/content/tabbrowser.xml",
       ],
       times: 4, // This number should only ever go down - never up.
     },
   );
 }
 
+// Windows Vista, 7 or 8
+if (navigator.userAgent.indexOf("Windows NT 6") != -1) {
+  EXPECTED_REFLOWS.push(
+    {
+      stack: [
+        "handleEvent@chrome://browser/content/tabbrowser.xml",
+      ],
+    },
+  );
+}
+
 /*
  * This test ensures that there are no unexpected
  * uninterruptible reflows when opening new windows.
  */
 add_task(async function() {
-  const IS_WIN8 = (navigator.userAgent.indexOf("Windows NT 6.2") != -1);
-  if (IS_WIN8) {
-    ok(true, "Skipping this test because of perma-failures on Windows 8 x64 (bug 1381521)");
-    return;
-  }
-
   // Flushing all caches helps to ensure that we get consistent
   // behaviour when opening a new window, even if windows have been
   // opened in previous tests.
   Services.obs.notifyObservers(null, "startupcache-invalidate");
   Services.obs.notifyObservers(null, "chrome-flush-skin-caches");
   Services.obs.notifyObservers(null, "chrome-flush-caches");
 
   let win = OpenBrowserWindow();