test_applicationacc.xhtml (2164B)
1 <?xml version="1.0"?> 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" 4 type="text/css"?> 5 6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 7 title="Accessible Application Accessible hierarchy tests"> 8 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 10 11 <script type="application/javascript" 12 src="../common.js" /> 13 <script type="application/javascript" 14 src="../role.js" /> 15 16 <script type="application/javascript"> 17 <![CDATA[ 18 //////////////////////////////////////////////////////////////////////////// 19 // Test 20 21 // Note: bug 560239 can be tested if this test runs in standalone mode only. 22 23 var gURL = "../tree/wnd.xhtml" 24 var gWnd = window.openDialog(gURL, "wnd", "chrome,width=600,height=600"); 25 26 function doTest() 27 { 28 // Application accessible should contain two root document accessibles, 29 // one is for browser window, another one is for open dialog window. 30 var accTree = { 31 role: ROLE_APP_ROOT, 32 children: [ 33 { 34 role: ROLE_CHROME_WINDOW, 35 name: "Accessibility Chrome Test Harness - Minefield" 36 }, 37 { 38 role: ROLE_CHROME_WINDOW, 39 name: "Empty Window" 40 } 41 ] 42 }; 43 testAccessibleTree(getApplicationAccessible(), accTree); 44 45 gWnd.close(); 46 47 SimpleTest.finish() 48 } 49 50 SimpleTest.waitForExplicitFinish(); 51 52 // We need to open dialog window before accessibility is started. 53 addLoadEvent(doTest); 54 ]]> 55 </script> 56 57 <hbox flex="1" style="overflow: auto;"> 58 <body xmlns="http://www.w3.org/1999/xhtml"> 59 <a target="_blank" 60 href="https://bugzilla.mozilla.org/show_bug.cgi?id=560239" 61 title="no children of application accessible for windows open before accessibility was started"> 62 Mozilla Bug 560239 63 </a><br/> 64 <p id="display"></p> 65 <div id="content" style="display: none"> 66 </div> 67 <pre id="test"> 68 </pre> 69 </body> 70 </hbox> 71 72 </window>