1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/tree/test_formctrl.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,130 @@ 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 +<!-- Firefox toolbar --> 1.10 +<?xml-stylesheet href="chrome://browser/content/browser.css" 1.11 + type="text/css"?> 1.12 + 1.13 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.14 + title="Accessible XUL checkbox and radio hierarchy tests"> 1.15 + 1.16 + <!-- Firefox toolbar --> 1.17 + <script type="application/javascript" 1.18 + src="chrome://browser/content/browser.js"/> 1.19 + 1.20 + <script type="application/javascript" 1.21 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 1.22 + 1.23 + <script type="application/javascript" 1.24 + src="../common.js" /> 1.25 + <script type="application/javascript" 1.26 + src="../role.js" /> 1.27 + 1.28 + <script type="application/javascript"> 1.29 + <![CDATA[ 1.30 + //////////////////////////////////////////////////////////////////////////// 1.31 + // Test 1.32 + 1.33 + function doTest() 1.34 + { 1.35 + // checkbox 1.36 + var accTree = { 1.37 + role: ROLE_CHECKBUTTON, 1.38 + children: [ ] 1.39 + }; 1.40 + 1.41 + testAccessibleTree("checkbox", accTree); 1.42 + 1.43 + // radiogroup 1.44 + accTree = { 1.45 + role: ROLE_GROUPING, 1.46 + children: [ 1.47 + { 1.48 + role: ROLE_RADIOBUTTON, 1.49 + children: [ ] 1.50 + }, 1.51 + { 1.52 + role: ROLE_RADIOBUTTON, 1.53 + children: [ ] 1.54 + } 1.55 + ] 1.56 + }; 1.57 + 1.58 + testAccessibleTree("radiogroup", accTree); 1.59 + 1.60 + // toolbar 1.61 + accTree = { 1.62 + role: ROLE_TOOLBAR, 1.63 + name: "My toolbar", 1.64 + children: [ 1.65 + { 1.66 + role: ROLE_PUSHBUTTON, 1.67 + name: "hello", 1.68 + children: [ ] 1.69 + } 1.70 + ] 1.71 + }; 1.72 + 1.73 + testAccessibleTree("toolbar", accTree); 1.74 + 1.75 + // toolbar 1.76 + accTree = { 1.77 + role: ROLE_TOOLBAR, 1.78 + name: "My second toolbar", 1.79 + children: [ 1.80 + { 1.81 + role: ROLE_PUSHBUTTON, 1.82 + name: "hello", 1.83 + children: [ ] 1.84 + } 1.85 + ] 1.86 + }; 1.87 + 1.88 + testAccessibleTree("toolbar2", accTree); 1.89 + 1.90 + if (!SEAMONKEY) 1.91 + testAccessibleTree("tb_customizable", { TOOLBAR: [] }); 1.92 + 1.93 + SimpleTest.finish() 1.94 + } 1.95 + 1.96 + SimpleTest.waitForExplicitFinish(); 1.97 + addA11yLoadEvent(doTest); 1.98 + ]]> 1.99 + </script> 1.100 + 1.101 + <hbox flex="1" style="overflow: auto;"> 1.102 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.103 + <a target="_blank" 1.104 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045" 1.105 + title="Fix O(n^2) access to all the children of a container"> 1.106 + Mozilla Bug 342045 1.107 + </a><br/> 1.108 + <p id="display"></p> 1.109 + <div id="content" style="display: none"> 1.110 + </div> 1.111 + <pre id="test"> 1.112 + </pre> 1.113 + </body> 1.114 + 1.115 + <vbox flex="1"> 1.116 + <checkbox id="checkbox" label="checkbox"/> 1.117 + <radiogroup id="radiogroup"> 1.118 + <radio label="radio1"/> 1.119 + <radio label="radio2"/> 1.120 + </radiogroup> 1.121 + <toolbar id="toolbar" toolbarname="My toolbar"> 1.122 + <toolbarbutton id="button1" label="hello"/> 1.123 + </toolbar> 1.124 + <toolbar id="toolbar2" toolbarname="2nd" aria-label="My second toolbar"> 1.125 + <toolbarbutton id="button2" label="hello"/> 1.126 + </toolbar> 1.127 + 1.128 + <toolbar id="tb_customizable" customizable="true"/> 1.129 + </vbox> 1.130 + </hbox> 1.131 + 1.132 +</window> 1.133 +