accessible/tests/mochitest/tree/test_applicationacc.xul

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial