Backed out changeset cfa04fd0f319 (bug 1367797) for causing browser-chrome failures on browser_tabstrip_overflow_underflow_reflows.js r=backout on a CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Sat, 09 Dec 2017 11:32:04 +0200
changeset 395885 7d3a7c5c694253c8d0382f368067b2c26a6ec192
parent 395884 8c677030915b8c1ea1451eead9b991d0f1e1f36f
child 395886 cb5613b3d40bdf6ba414c5f3fb01014617f0155b
push id56857
push userdluca@mozilla.com
push dateSat, 09 Dec 2017 09:33:45 +0000
treeherderautoland@7d3a7c5c6942 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1367797
milestone59.0a1
backs outcfa04fd0f3198bdefc3dbd3293756e0f1e101b96
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
Backed out changeset cfa04fd0f319 (bug 1367797) for causing browser-chrome failures on browser_tabstrip_overflow_underflow_reflows.js r=backout on a CLOSED TREE
browser/base/content/test/performance/browser_tabstrip_overflow_underflow_reflows.js
--- a/browser/base/content/test/performance/browser_tabstrip_overflow_underflow_reflows.js
+++ b/browser/base/content/test/performance/browser_tabstrip_overflow_underflow_reflows.js
@@ -45,71 +45,21 @@ add_task(async function() {
     await BrowserTestUtils.waitForEvent(gBrowser.selectedTab, "transitionend",
         false, e => e.propertyName === "max-width");
     await switchDone;
     await BrowserTestUtils.waitForCondition(() => {
       return gBrowser.tabContainer.arrowScrollbox.hasAttribute("scrolledtoend");
     });
   }, EXPECTED_OVERFLOW_REFLOWS, window);
 
-  Assert.ok(gBrowser.tabContainer.hasAttribute("overflow"),
-            "Tabs should now be overflowed.");
-
-  // Now test that opening and closing a tab while overflowed doesn't cause
-  // us to reflow.
-  await withReflowObserver(async function(dirtyFrame) {
-    let switchDone = BrowserTestUtils.waitForEvent(window, "TabSwitchDone");
-    BrowserOpenTab();
-    await switchDone;
-    await BrowserTestUtils.waitForCondition(() => {
-      return gBrowser.tabContainer.arrowScrollbox.hasAttribute("scrolledtoend");
-    });
-  }, [], window);
-
-  await withReflowObserver(async function(dirtyFrame) {
-    let switchDone = BrowserTestUtils.waitForEvent(window, "TabSwitchDone");
-    await BrowserTestUtils.removeTab(gBrowser.selectedTab, { animate: true });
-    await switchDone;
-  }, [], window);
-
-  // At this point, we have an overflowed tab strip, and we've got the last tab
-  // selected. This should mean that the first tab is scrolled out of view.
-  // Let's test that we don't reflow when switching to that first tab.
-  let lastTab = gBrowser.selectedTab;
-  let arrowScrollbox = gBrowser.tabContainer.arrowScrollbox;
-
-  // First, we'll check that the first tab is actually scrolled out of view.
-  let firstTab = gBrowser.tabContainer.firstChild;
-  let firstTabRect = firstTab.getBoundingClientRect();
-  Assert.ok(firstTabRect.left + firstTabRect.width < arrowScrollbox.scrollPosition,
-            "First tab should be scrolled out of view.");
-
-  // Now switch to the first tab. We shouldn't flush layout at all.
-  await withReflowObserver(async function(dirtyFrame) {
-    await BrowserTestUtils.switchTab(gBrowser, firstTab);
-    await BrowserTestUtils.waitForCondition(() => {
-      return gBrowser.tabContainer.arrowScrollbox.hasAttribute("scrolledtostart");
-    });
-  }, [], window);
-
-  // Okay, now close the last tab. The tabstrip should stay overflowed, but removing
-  // one more after that should underflow it.
-  await BrowserTestUtils.removeTab(lastTab);
-
-  Assert.ok(gBrowser.tabContainer.hasAttribute("overflow"),
-            "Tabs should still be overflowed.");
-
-  lastTab = gBrowser.tabContainer.lastElementChild;
-  await BrowserTestUtils.switchTab(gBrowser, lastTab);
-
-  // ... and make sure we don't flush layout when closing it, and exiting
-  // the overflowed state.
   await withReflowObserver(async function() {
     let switchDone = BrowserTestUtils.waitForEvent(window, "TabSwitchDone");
-    await BrowserTestUtils.removeTab(lastTab, { animate: true });
+    let transitionPromise =
+      BrowserTestUtils.waitForEvent(gBrowser.selectedTab,
+                                    "transitionend", false,
+                                    e => e.propertyName === "max-width");
+    await BrowserTestUtils.removeTab(gBrowser.selectedTab, { animate: true });
+    await transitionPromise;
     await switchDone;
   }, EXPECTED_UNDERFLOW_REFLOWS, window);
 
-  Assert.ok(!gBrowser.tabContainer.hasAttribute("overflow"),
-            "Tabs should no longer be overflowed.");
-
   await removeAllButFirstTab();
 });