Bug 766112 - intermittent failure of events/test_docload.xul, r=tbsaunde
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 26 Sep 2012 10:30:01 +0900
changeset 111774 4a080f2c3091466eb606dbf546fd8b44e6dc0d56
parent 111773 a25086637d1fcb604d2dbe6aebc189a657cf994b
child 111775 d4fc54501277097b71a60620dbc9155436e6aef3
push idunknown
push userunknown
push dateunknown
reviewerstbsaunde
bugs766112
milestone18.0a1
Bug 766112 - intermittent failure of events/test_docload.xul, r=tbsaunde
accessible/tests/mochitest/events/test_docload.xul
--- a/accessible/tests/mochitest/events/test_docload.xul
+++ b/accessible/tests/mochitest/events/test_docload.xul
@@ -105,17 +105,18 @@
 
       this.unexpectedEventSeq = [
         new invokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE, getNestedDoc),
         new invokerChecker(EVENT_STATE_CHANGE, getNestedDoc)
       ];
 
       function getNestedDoc()
       {
-        return currentTabDocument().getElementsByTagName("iframe")[0].firstChild;
+        var iframeNodes = currentTabDocument().getElementsByTagName("iframe");
+        return iframeNodes ? iframeNodes[0].firstChild : null;
       }
     }
 
     /**
      * Reload the page by F5 (isFromUserInput flag is true).
      */
     function userReloadInvoker()
     {
@@ -182,17 +183,17 @@
       {
         return "load error page: '" + aURLDescr + "'";
       }
     }
 
     ////////////////////////////////////////////////////////////////////////////
     // Tests
 
-    gA11yEventDumpToConsole = true; // debug
+    //gA11yEventDumpToConsole = true; // debug
     //gA11yEventDumpFeature = "parentchain:reorder";
 
     var gQueue = null;
     function doTests()
     {
       gQueue = new eventQueue();
 
       var dataURL =