test_docload_aria.html (2043B)
1 <html> 2 3 <head> 4 <title>Accessible events testing for ARIA document</title> 5 6 <link rel="stylesheet" type="text/css" 7 href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 8 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 10 11 <script type="application/javascript" 12 src="../../common.js"></script> 13 <script type="application/javascript" 14 src="../../role.js"></script> 15 <script type="application/javascript" 16 src="../../states.js"></script> 17 <script type="application/javascript" 18 src="../../events.js"></script> 19 20 <script type="application/javascript"> 21 // ////////////////////////////////////////////////////////////////////////// 22 // Invokers 23 24 function showARIADialog(aID) { 25 this.dialogNode = getNode(aID); 26 27 this.eventSeq = [ 28 new invokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE, this.dialogNode), 29 ]; 30 31 this.invoke = function showARIADialog_invoke() { 32 this.dialogNode.style.display = "block"; 33 }; 34 35 this.getID = function showARIADialog_getID() { 36 return "show ARIA dialog"; 37 }; 38 } 39 40 // ////////////////////////////////////////////////////////////////////////// 41 // Do tests 42 43 var gQueue = null; 44 45 function doTests() { 46 gQueue = new eventQueue(); 47 48 gQueue.push(new showARIADialog("dialog")); 49 gQueue.push(new showARIADialog("document")); 50 51 gQueue.invoke(); // Will call SimpleTest.finish(); 52 } 53 54 SimpleTest.waitForExplicitFinish(); 55 addA11yLoadEvent(doTests); 56 </script> 57 </head> 58 59 <body> 60 61 <a target="_blank" 62 href="https://bugzilla.mozilla.org/show_bug.cgi?id=759833" 63 title="ARIA documents should fire document loading events"> 64 Mozilla Bug 759833 65 </a> 66 67 <p id="display"></p> 68 <div id="content" style="display: none"></div> 69 <pre id="test"> 70 </pre> 71 72 <div role="dialog" id="dialog" style="display: none;">It's a dialog</div> 73 <div role="document" id="document" style="display: none;">It's a document</div> 74 </body> 75 </html>