Bug 606567 - Intermittent failure in browser/base/content/test/browser_bug585785.js | tab successfully removed. r=gavin a=...
authorDão Gottwald <dao@mozilla.com>
Mon, 25 Oct 2010 09:59:42 +0200
changeset 56423 3ddfa411f716a66601d463718d96003c6a603a34
parent 56422 0fed77757e88dfbe11a0bc8c478dc95724dd0b95
child 56424 b3bc32ff061261077c534d707d5b1c645c7d521d
push id16540
push userdgottwald@mozilla.com
push dateMon, 25 Oct 2010 08:00:16 +0000
treeherdermozilla-central@3ddfa411f716 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs606567, 585785
milestone2.0b8pre
first release with
nightly linux32
3ddfa411f716 / 4.0b8pre / 20101025030618 / files
nightly linux64
3ddfa411f716 / 4.0b8pre / 20101025030842 / files
nightly mac
3ddfa411f716 / 4.0b8pre / 20101025030817 / files
nightly win32
3ddfa411f716 / 4.0b8pre / 20101025042833 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 606567 - Intermittent failure in browser/base/content/test/browser_bug585785.js | tab successfully removed. r=gavin a=...
browser/base/content/test/browser_bug585785.js
--- a/browser/base/content/test/browser_bug585785.js
+++ b/browser/base/content/test/browser_bug585785.js
@@ -1,10 +1,19 @@
 function test() {
   waitForExplicitFinish();
+
   var tab = gBrowser.addTab();
-  executeSoon(function () {
+  isnot(tab.getAttribute("fadein"), "true", "newly opened tab is yet to fade in");
+
+  // Remove the tab right before the opening animation's first frame
+  window.mozRequestAnimationFrame(function () {
+    if (tab.getAttribute("fadein") != "true") {
+      window.mozRequestAnimationFrame(arguments.callee);
+      return;
+    }
+
     info(window.getComputedStyle(tab).maxWidth);
     gBrowser.removeTab(tab, {animate:true});
     ok(!tab.parentNode, "tab successfully removed");
     finish();
   });
 }