Bug 810554 - intermittent failure accessible/states/test_link.html | Test timed out, r=tbsaunde
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 14 Nov 2012 18:45:46 +0900
changeset 113212 e73ee9780c4df2d8d1cdec06e758f72709d35bd5
parent 113211 24b745c02ce7da5913c8703a85f4b406de4a8654
child 113213 83d175cb799d6340b185939ca388848a1a3d1e8d
push id23859
push useremorley@mozilla.com
push dateWed, 14 Nov 2012 14:36:31 +0000
treeherdermozilla-central@87928cd21b40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs810554
milestone19.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 810554 - intermittent failure accessible/states/test_link.html | Test timed out, r=tbsaunde
accessible/tests/mochitest/states/test_link.html
--- a/accessible/tests/mochitest/states/test_link.html
+++ b/accessible/tests/mochitest/states/test_link.html
@@ -18,23 +18,24 @@
   <script type="application/javascript"
           src="../states.js"></script>
   <script type="application/javascript"
           src="../events.js"></script>
 
   <script type="application/javascript">
     //gA11yEventDumpToConsole = true; // debug stuff
 
+    var gLinkWindow = null;
     function closeDocChecker()
     {
       this.__proto__ = new asyncInvokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE);
 
       this.check = function closeDocChecker_check(aEvent)
       {
-        aEvent.accessible.rootDocument.window.close();
+        gLinkWindow = aEvent.accessible.rootDocument.window;
       }
 
       this.match = function closeDocChecker_match(aEvent)
       {
         return true;
       }
     }
 
@@ -51,18 +52,16 @@
       }
 
       this.getID = function clickLink_getID()
       {
         return "link + '" + aID + "' clicked.";
       }
     }
 
-gA11yEventDumpToConsole = true;
-
     var gQueue = null;
     function doTest()
     {
       // a@href and its text node
       testStates("link_href", STATE_LINKED);
       testStates(getAccessible("link_href").firstChild, STATE_LINKED);
 
       // a@onclick
@@ -84,16 +83,17 @@ gA11yEventDumpToConsole = true;
       testStates("link_notlink", 0, 0, STATE_LINKED);
 
       // a: no traversed state
       testStates("link_traversed", 0, 0, STATE_TRAVERSED);
 
       // a: traversed state
       gQueue = new eventQueue();
       gQueue.push(new clickLink("link_traversed"));
+      gQueue.onFinish = function() { gLinkWindow.close(); }
       gQueue.invoke(); // will call SimpleTest.finsih();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 
 </head>