Bug 1020039 - Fix intermittent failures in relations/test_embeds.xul. a=test-only
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 11 Sep 2014 15:58:28 -0400
changeset 216714 5007a59d2d92
parent 216713 e3fe616ef9a2
child 216715 40044a225ae7
push id3889
push userryanvm@gmail.com
push date2014-09-15 13:57 +0000
treeherdermozilla-beta@0af2575571f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs1020039
milestone33.0
Bug 1020039 - Fix intermittent failures in relations/test_embeds.xul. a=test-only
accessible/tests/mochitest/common.js
accessible/tests/mochitest/relations/test_embeds.xul
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -232,17 +232,17 @@ function getAccessible(aAccOrElmOrID, aI
   if (!acc) {
     try {
       acc = gAccRetrieval.getAccessibleFor(elm);
     } catch (e) {
     }
 
     if (!acc) {
       if (!(aDoNotFailIf & DONOTFAIL_IF_NO_ACC))
-        ok(false, "Can't get accessible for " + aAccOrElmOrID);
+        ok(false, "Can't get accessible for " + prettyName(aAccOrElmOrID));
 
       return null;
     }
   }
 
   if (!aInterfaces)
     return acc;
 
--- a/accessible/tests/mochitest/relations/test_embeds.xul
+++ b/accessible/tests/mochitest/relations/test_embeds.xul
@@ -53,16 +53,19 @@
     }
 
     function browserReorderChecker()
     {
       this.type = EVENT_REORDER;
 
       this.match = function browserReorderChecker_match(aEvent)
       {
+        if (!isAccessible(currentBrowser()))
+          return false;
+
         // Reorder event might be duped because of temporary document creation.
         if (aEvent.accessible == getAccessible(currentBrowser())) {
           this.cnt++;
           return this.cnt != 2;
         }
 
         return false;
       }
@@ -91,33 +94,33 @@
       {
         return "load uri '" + aURI + "' in new tab";
       }
     }
 
     ////////////////////////////////////////////////////////////////////////////
     // Testing
 
-    gA11yEventDumpToConsole = true; // debug
+    //gA11yEventDumpToConsole = true; // debug
 
     var gQueue = null;
     function doTests()
     {
       testRelation(browserDocument(), RELATION_EMBEDS,
                    getAccessible(currentTabDocument()));
 
-      enableLogging("docload");
+      //enableLogging("docload");
       gQueue = new eventQueue();
 
       gQueue.push(new loadURI("about:about"));
       gQueue.push(new loadOneTab("about:mozilla"));
 
       gQueue.onFinish = function()
       {
-        disableLogging();
+        //disableLogging();
         closeBrowserWindow();
       }
       gQueue.invoke();
     }
 
     SimpleTest.waitForExplicitFinish();
     openBrowserWindow(doTests, "about:");
   ]]>