1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/tree/test_applicationacc.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,74 @@ 1.4 +<?xml version="1.0"?> 1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> 1.6 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" 1.7 + type="text/css"?> 1.8 + 1.9 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.10 + title="Accessible Application Accessible hierarchy tests"> 1.11 + 1.12 + <script type="application/javascript" 1.13 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 1.14 + 1.15 + <script type="application/javascript" 1.16 + src="../common.js" /> 1.17 + <script type="application/javascript" 1.18 + src="../role.js" /> 1.19 + 1.20 + <script type="application/javascript"> 1.21 + <![CDATA[ 1.22 + //////////////////////////////////////////////////////////////////////////// 1.23 + // Test 1.24 + 1.25 + // Note: bug 560239 can be tested if this test runs in standalone mode only. 1.26 + 1.27 + var gURL = "../tree/wnd.xul" 1.28 + var gWnd = window.openDialog(gURL, "wnd", "chrome,width=600,height=600"); 1.29 + 1.30 + function doTest() 1.31 + { 1.32 + // Application accessible should contain two root document accessibles, 1.33 + // one is for browser window, another one is for open dialog window. 1.34 + var accTree = { 1.35 + role: ROLE_APP_ROOT, 1.36 + children: [ 1.37 + { 1.38 + role: ROLE_CHROME_WINDOW, 1.39 + name: "Accessibility Chrome Test Harness - Minefield" 1.40 + }, 1.41 + { 1.42 + role: ROLE_CHROME_WINDOW, 1.43 + name: "Empty Window" 1.44 + } 1.45 + ] 1.46 + }; 1.47 + testAccessibleTree(getApplicationAccessible(), accTree); 1.48 + 1.49 + gWnd.close(); 1.50 + 1.51 + SimpleTest.finish() 1.52 + } 1.53 + 1.54 + SimpleTest.waitForExplicitFinish(); 1.55 + 1.56 + // We need to open dialog window before accessibility is started. 1.57 + addLoadEvent(doTest); 1.58 + ]]> 1.59 + </script> 1.60 + 1.61 + <hbox flex="1" style="overflow: auto;"> 1.62 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.63 + <a target="_blank" 1.64 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=560239" 1.65 + title="no children of application accessible for windows open before accessibility was started"> 1.66 + Mozilla Bug 560239 1.67 + </a><br/> 1.68 + <p id="display"></p> 1.69 + <div id="content" style="display: none"> 1.70 + </div> 1.71 + <pre id="test"> 1.72 + </pre> 1.73 + </body> 1.74 + </hbox> 1.75 + 1.76 +</window> 1.77 +