Bug 1363361 - Update expected reflows on window open now that we're using nsIDOMWindowUtils to dirty the frame tree. r=florian
authorMike Conley <mconley@mozilla.com>
Wed, 05 Jul 2017 13:57:57 -0700
changeset 418954 51c18c1a9eef5094d49a0677bfa0254f8bc61c22
parent 418953 65fbaf1abd1d08c8592cfb7325fc8a9843f452bf
child 418955 b05b1b40f5d296dbb62b495a5c1a3e5480aaa652
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1363361
milestone56.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 1363361 - Update expected reflows on window open now that we're using nsIDOMWindowUtils to dirty the frame tree. r=florian MozReview-Commit-ID: 13NQn1618mR
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
@@ -15,45 +15,132 @@
 const EXPECTED_REFLOWS = [
   [
     "select@chrome://global/content/bindings/textbox.xml",
     "focusAndSelectUrlBar@chrome://browser/content/browser.js",
     "_delayedStartup@chrome://browser/content/browser.js",
   ],
 ];
 
-if (Services.appinfo.OS == "Darwin") {
-  // TabsInTitlebar._update causes a reflow on OS X trying to do calculations
-  // since layout info is already dirty. This doesn't seem to happen before
-  // MozAfterPaint on Linux.
-  EXPECTED_REFLOWS.push(
-    [
-      "rect@chrome://browser/content/browser-tabsintitlebar.js",
-      "_update@chrome://browser/content/browser-tabsintitlebar.js",
-      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
-      "handleEvent@chrome://browser/content/tabbrowser.xml",
-    ],
-  );
+if (Services.appinfo.OS == "Linux") {
+  if (gMultiProcessBrowser) {
+    EXPECTED_REFLOWS.push(
+      [
+        "handleEvent@chrome://browser/content/tabbrowser.xml",
+        "EventListener.handleEvent*tabbrowser-tabs_XBL_Constructor@chrome://browser/content/tabbrowser.xml",
+      ],
+    );
+  } else {
+    EXPECTED_REFLOWS.push(
+      [
+        "handleEvent@chrome://browser/content/tabbrowser.xml",
+        "inferFromText@chrome://browser/content/browser.js",
+        "handleEvent@chrome://browser/content/browser.js",
+      ],
+    );
+  }
 }
 
-if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
+if (Services.appinfo.OS == "Darwin") {
   EXPECTED_REFLOWS.push(
     [
       "handleEvent@chrome://browser/content/tabbrowser.xml",
       "inferFromText@chrome://browser/content/browser.js",
       "handleEvent@chrome://browser/content/browser.js",
     ],
   );
 }
 
+if (Services.appinfo.OS == "WINNT") {
+  EXPECTED_REFLOWS.push(
+    [
+      "verticalMargins@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "verticalMargins@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+      "inferFromText@chrome://browser/content/browser.js",
+      "handleEvent@chrome://browser/content/browser.js",
+    ],
+
+    [
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+      "EventListener.handleEvent*tabbrowser-tabs_XBL_Constructor@chrome://browser/content/tabbrowser.xml",
+    ],
+  );
+}
+
+if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
+  EXPECTED_REFLOWS.push(
+    [
+      "rect@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "rect@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "rect@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "rect@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "verticalMargins@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+
+    [
+      "verticalMargins@chrome://browser/content/browser-tabsintitlebar.js",
+      "_update@chrome://browser/content/browser-tabsintitlebar.js",
+      "updateAppearance@chrome://browser/content/browser-tabsintitlebar.js",
+      "handleEvent@chrome://browser/content/tabbrowser.xml",
+    ],
+  );
+}
+
 /*
  * This test ensures that there are no unexpected
  * uninterruptible reflows when opening new windows.
  */
 add_task(async function() {
+  // 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();
 
   await withReflowObserver(async function() {
     let resizeEvent = BrowserTestUtils.waitForEvent(win, "resize");
     let delayedStartup =
       TestUtils.topicObserved("browser-delayed-startup-finished",
                               subject => subject == win);
     await resizeEvent;