Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>HTML select control tests</title> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="../common.js"></script> |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../role.js"></script> |
michael@0 | 15 | |
michael@0 | 16 | <script type="application/javascript"> |
michael@0 | 17 | function doTest() |
michael@0 | 18 | { |
michael@0 | 19 | var accTree = { |
michael@0 | 20 | role: ROLE_LISTBOX, |
michael@0 | 21 | children: [ |
michael@0 | 22 | { |
michael@0 | 23 | role: ROLE_GROUPING, |
michael@0 | 24 | children: [ |
michael@0 | 25 | { |
michael@0 | 26 | role: ROLE_STATICTEXT, |
michael@0 | 27 | children: [ ] |
michael@0 | 28 | }, |
michael@0 | 29 | { |
michael@0 | 30 | role: ROLE_OPTION, |
michael@0 | 31 | children: [ |
michael@0 | 32 | { |
michael@0 | 33 | role: ROLE_TEXT_LEAF |
michael@0 | 34 | } |
michael@0 | 35 | ] |
michael@0 | 36 | }, |
michael@0 | 37 | { |
michael@0 | 38 | role: ROLE_OPTION, |
michael@0 | 39 | children: [ |
michael@0 | 40 | { |
michael@0 | 41 | role: ROLE_TEXT_LEAF |
michael@0 | 42 | } |
michael@0 | 43 | ] |
michael@0 | 44 | } |
michael@0 | 45 | ] |
michael@0 | 46 | }, |
michael@0 | 47 | { |
michael@0 | 48 | role: ROLE_OPTION, |
michael@0 | 49 | children: [ |
michael@0 | 50 | { |
michael@0 | 51 | role: ROLE_TEXT_LEAF |
michael@0 | 52 | } |
michael@0 | 53 | ] |
michael@0 | 54 | } |
michael@0 | 55 | ] |
michael@0 | 56 | }; |
michael@0 | 57 | testAccessibleTree("listbox", accTree); |
michael@0 | 58 | |
michael@0 | 59 | accTree = { |
michael@0 | 60 | role: ROLE_COMBOBOX, |
michael@0 | 61 | children: [ |
michael@0 | 62 | { |
michael@0 | 63 | role: ROLE_COMBOBOX_LIST, |
michael@0 | 64 | children: [ |
michael@0 | 65 | { |
michael@0 | 66 | role: ROLE_GROUPING, |
michael@0 | 67 | children: [ |
michael@0 | 68 | { |
michael@0 | 69 | role: ROLE_STATICTEXT, |
michael@0 | 70 | children: [ ] |
michael@0 | 71 | }, |
michael@0 | 72 | { |
michael@0 | 73 | role: ROLE_COMBOBOX_OPTION, |
michael@0 | 74 | children: [ |
michael@0 | 75 | { |
michael@0 | 76 | role: ROLE_TEXT_LEAF |
michael@0 | 77 | } |
michael@0 | 78 | ] |
michael@0 | 79 | }, |
michael@0 | 80 | { |
michael@0 | 81 | role: ROLE_COMBOBOX_OPTION, |
michael@0 | 82 | children: [ |
michael@0 | 83 | { |
michael@0 | 84 | role: ROLE_TEXT_LEAF |
michael@0 | 85 | } |
michael@0 | 86 | ] |
michael@0 | 87 | }, |
michael@0 | 88 | ] |
michael@0 | 89 | }, |
michael@0 | 90 | { |
michael@0 | 91 | role: ROLE_COMBOBOX_OPTION, |
michael@0 | 92 | children: [ |
michael@0 | 93 | { |
michael@0 | 94 | role: ROLE_TEXT_LEAF |
michael@0 | 95 | } |
michael@0 | 96 | ] |
michael@0 | 97 | } |
michael@0 | 98 | ] |
michael@0 | 99 | } |
michael@0 | 100 | ] |
michael@0 | 101 | }; |
michael@0 | 102 | testAccessibleTree("combobox", accTree); |
michael@0 | 103 | |
michael@0 | 104 | SimpleTest.finish(); |
michael@0 | 105 | } |
michael@0 | 106 | |
michael@0 | 107 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 108 | addA11yLoadEvent(doTest); |
michael@0 | 109 | </script> |
michael@0 | 110 | </head> |
michael@0 | 111 | <body> |
michael@0 | 112 | |
michael@0 | 113 | <a target="_blank" |
michael@0 | 114 | title="remove all the code in #ifdef COMBO_BOX_WITH_THREE_CHILDREN" |
michael@0 | 115 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=506616"> |
michael@0 | 116 | Mozilla Bug 506616 |
michael@0 | 117 | </a> |
michael@0 | 118 | <p id="display"></p> |
michael@0 | 119 | <div id="content" style="display: none"></div> |
michael@0 | 120 | <pre id="test"> |
michael@0 | 121 | </pre> |
michael@0 | 122 | |
michael@0 | 123 | <select id="listbox" size="4"> |
michael@0 | 124 | <optgroup label="Colors"> |
michael@0 | 125 | <option>Red</option> |
michael@0 | 126 | <option>Blue</option> |
michael@0 | 127 | </optgroup> |
michael@0 | 128 | <option>Animal</option> |
michael@0 | 129 | </select> |
michael@0 | 130 | |
michael@0 | 131 | <select id="combobox"> |
michael@0 | 132 | <optgroup label="Colors"> |
michael@0 | 133 | <option>Red</option> |
michael@0 | 134 | <option>Blue</option> |
michael@0 | 135 | </optgroup> |
michael@0 | 136 | <option>Animal</option> |
michael@0 | 137 | </select> |
michael@0 | 138 | </body> |
michael@0 | 139 | </html> |