accessible/tests/mochitest/tree/test_formctrl.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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 <!-- Firefox toolbar -->
michael@0 7 <?xml-stylesheet href="chrome://browser/content/browser.css"
michael@0 8 type="text/css"?>
michael@0 9
michael@0 10 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 11 title="Accessible XUL checkbox and radio hierarchy tests">
michael@0 12
michael@0 13 <!-- Firefox toolbar -->
michael@0 14 <script type="application/javascript"
michael@0 15 src="chrome://browser/content/browser.js"/>
michael@0 16
michael@0 17 <script type="application/javascript"
michael@0 18 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
michael@0 19
michael@0 20 <script type="application/javascript"
michael@0 21 src="../common.js" />
michael@0 22 <script type="application/javascript"
michael@0 23 src="../role.js" />
michael@0 24
michael@0 25 <script type="application/javascript">
michael@0 26 <![CDATA[
michael@0 27 ////////////////////////////////////////////////////////////////////////////
michael@0 28 // Test
michael@0 29
michael@0 30 function doTest()
michael@0 31 {
michael@0 32 // checkbox
michael@0 33 var accTree = {
michael@0 34 role: ROLE_CHECKBUTTON,
michael@0 35 children: [ ]
michael@0 36 };
michael@0 37
michael@0 38 testAccessibleTree("checkbox", accTree);
michael@0 39
michael@0 40 // radiogroup
michael@0 41 accTree = {
michael@0 42 role: ROLE_GROUPING,
michael@0 43 children: [
michael@0 44 {
michael@0 45 role: ROLE_RADIOBUTTON,
michael@0 46 children: [ ]
michael@0 47 },
michael@0 48 {
michael@0 49 role: ROLE_RADIOBUTTON,
michael@0 50 children: [ ]
michael@0 51 }
michael@0 52 ]
michael@0 53 };
michael@0 54
michael@0 55 testAccessibleTree("radiogroup", accTree);
michael@0 56
michael@0 57 // toolbar
michael@0 58 accTree = {
michael@0 59 role: ROLE_TOOLBAR,
michael@0 60 name: "My toolbar",
michael@0 61 children: [
michael@0 62 {
michael@0 63 role: ROLE_PUSHBUTTON,
michael@0 64 name: "hello",
michael@0 65 children: [ ]
michael@0 66 }
michael@0 67 ]
michael@0 68 };
michael@0 69
michael@0 70 testAccessibleTree("toolbar", accTree);
michael@0 71
michael@0 72 // toolbar
michael@0 73 accTree = {
michael@0 74 role: ROLE_TOOLBAR,
michael@0 75 name: "My second toolbar",
michael@0 76 children: [
michael@0 77 {
michael@0 78 role: ROLE_PUSHBUTTON,
michael@0 79 name: "hello",
michael@0 80 children: [ ]
michael@0 81 }
michael@0 82 ]
michael@0 83 };
michael@0 84
michael@0 85 testAccessibleTree("toolbar2", accTree);
michael@0 86
michael@0 87 if (!SEAMONKEY)
michael@0 88 testAccessibleTree("tb_customizable", { TOOLBAR: [] });
michael@0 89
michael@0 90 SimpleTest.finish()
michael@0 91 }
michael@0 92
michael@0 93 SimpleTest.waitForExplicitFinish();
michael@0 94 addA11yLoadEvent(doTest);
michael@0 95 ]]>
michael@0 96 </script>
michael@0 97
michael@0 98 <hbox flex="1" style="overflow: auto;">
michael@0 99 <body xmlns="http://www.w3.org/1999/xhtml">
michael@0 100 <a target="_blank"
michael@0 101 href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045"
michael@0 102 title="Fix O(n^2) access to all the children of a container">
michael@0 103 Mozilla Bug 342045
michael@0 104 </a><br/>
michael@0 105 <p id="display"></p>
michael@0 106 <div id="content" style="display: none">
michael@0 107 </div>
michael@0 108 <pre id="test">
michael@0 109 </pre>
michael@0 110 </body>
michael@0 111
michael@0 112 <vbox flex="1">
michael@0 113 <checkbox id="checkbox" label="checkbox"/>
michael@0 114 <radiogroup id="radiogroup">
michael@0 115 <radio label="radio1"/>
michael@0 116 <radio label="radio2"/>
michael@0 117 </radiogroup>
michael@0 118 <toolbar id="toolbar" toolbarname="My toolbar">
michael@0 119 <toolbarbutton id="button1" label="hello"/>
michael@0 120 </toolbar>
michael@0 121 <toolbar id="toolbar2" toolbarname="2nd" aria-label="My second toolbar">
michael@0 122 <toolbarbutton id="button2" label="hello"/>
michael@0 123 </toolbar>
michael@0 124
michael@0 125 <toolbar id="tb_customizable" customizable="true"/>
michael@0 126 </vbox>
michael@0 127 </hbox>
michael@0 128
michael@0 129 </window>
michael@0 130

mercurial