Bug 782991 - enable more logging of states/test_link.html
authorAlexander Surkov <surkov.alexander@gmail.com>
Mon, 24 Sep 2012 20:07:35 +0900
changeset 108009 e950ed8dc21fffa3198948b30732f9f94a12120f
parent 108008 83737cad6889bef709ac4371a2dffdc034a7d4a0
child 108010 6a18b979c82cde17705497467a3dfd456f34cc6d
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
bugs782991
milestone18.0a1
Bug 782991 - enable more logging of states/test_link.html
accessible/tests/mochitest/states/test_link.html
accessible/tests/mochitest/states/test_popup.xul
--- a/accessible/tests/mochitest/states/test_link.html
+++ b/accessible/tests/mochitest/states/test_link.html
@@ -44,29 +44,32 @@
       // a@role="button"
       testStates("link_ariabutton", 0, 0, STATE_LINKED);
 
       // a (no @href, no click event listener)
       testStates("link_notlink", 0, 0, STATE_LINKED);
 
       // a: traversal state
       testStates("link_traversed", 0, 0, STATE_TRAVERSED);
+
+      enableLogging("docload");
       registerA11yEventListener(EVENT_DOCUMENT_LOAD_COMPLETE,
                                 traversedLinkTester);
 
       synthesizeMouse(getNode("link_traversed"), 1, 1, { shiftKey: true });
     }
 
     var traversedLinkTester = {
       handleEvent: function traversedLinkTester_handleEvent(aEvent) {
         unregisterA11yEventListener(EVENT_DOCUMENT_LOAD_COMPLETE,
                                     traversedLinkTester);
         aEvent.accessible.rootDocument.window.close();
 
         testStates("link_traversed", STATE_TRAVERSED);
+        disableLogging();
         SimpleTest.finish();
       }
     };
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 
--- a/accessible/tests/mochitest/states/test_popup.xul
+++ b/accessible/tests/mochitest/states/test_popup.xul
@@ -15,16 +15,18 @@
           src="../role.js" />
   <script type="application/javascript"
           src="../states.js" />
 
   <script type="application/javascript">
   <![CDATA[
     function doTest()
     {
+      disableLogging(); // a hack from failing test_link.html to stop logging.
+
       // label with popup
       testStates("labelWithPopup", STATE_HASPOPUP);
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);