Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
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 XUL tabbox 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 | function doTest() |
michael@0 | 23 | { |
michael@0 | 24 | ////////////////////////////////////////////////////////////////////////// |
michael@0 | 25 | // tabbox |
michael@0 | 26 | |
michael@0 | 27 | var accTree = { |
michael@0 | 28 | role: ROLE_PAGETABLIST, |
michael@0 | 29 | children: [ |
michael@0 | 30 | { |
michael@0 | 31 | role: ROLE_PAGETAB, |
michael@0 | 32 | children: [] |
michael@0 | 33 | }, |
michael@0 | 34 | { |
michael@0 | 35 | role: ROLE_PAGETAB, |
michael@0 | 36 | children: [] |
michael@0 | 37 | } |
michael@0 | 38 | ] |
michael@0 | 39 | }; |
michael@0 | 40 | testAccessibleTree("tabs", accTree); |
michael@0 | 41 | |
michael@0 | 42 | accTree = { |
michael@0 | 43 | role: ROLE_PANE, |
michael@0 | 44 | children: [ |
michael@0 | 45 | { |
michael@0 | 46 | role: ROLE_PROPERTYPAGE, |
michael@0 | 47 | children: [] |
michael@0 | 48 | }, |
michael@0 | 49 | { |
michael@0 | 50 | role: ROLE_PROPERTYPAGE, |
michael@0 | 51 | children: [] |
michael@0 | 52 | } |
michael@0 | 53 | ] |
michael@0 | 54 | }; |
michael@0 | 55 | testAccessibleTree("tabpanels", accTree); |
michael@0 | 56 | |
michael@0 | 57 | SimpleTest.finish() |
michael@0 | 58 | } |
michael@0 | 59 | |
michael@0 | 60 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 61 | addA11yLoadEvent(doTest); |
michael@0 | 62 | ]]> |
michael@0 | 63 | </script> |
michael@0 | 64 | |
michael@0 | 65 | <hbox flex="1" style="overflow: auto;"> |
michael@0 | 66 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 67 | <a target="_blank" |
michael@0 | 68 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=540389" |
michael@0 | 69 | title=" WARNING: Bad accessible tree!: [tabbrowser tab] "> |
michael@0 | 70 | Mozilla Bug 540389 |
michael@0 | 71 | </a><br/> |
michael@0 | 72 | <a target="_blank" |
michael@0 | 73 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=552944" |
michael@0 | 74 | title="No relationship between tabs and associated property page in new tabbrowser construct"> |
michael@0 | 75 | Mozilla Bug 552944 |
michael@0 | 76 | </a><br/> |
michael@0 | 77 | <p id="display"></p> |
michael@0 | 78 | <div id="content" style="display: none"> |
michael@0 | 79 | </div> |
michael@0 | 80 | <pre id="test"> |
michael@0 | 81 | </pre> |
michael@0 | 82 | </body> |
michael@0 | 83 | |
michael@0 | 84 | <vbox flex="1"> |
michael@0 | 85 | <tabbox> |
michael@0 | 86 | <tabs id="tabs"> |
michael@0 | 87 | <tab label="tab1"/> |
michael@0 | 88 | <tab label="tab2"/> |
michael@0 | 89 | </tabs> |
michael@0 | 90 | <tabpanels id="tabpanels"> |
michael@0 | 91 | <tabpanel/> |
michael@0 | 92 | <tabpanel/> |
michael@0 | 93 | </tabpanels> |
michael@0 | 94 | </tabbox> |
michael@0 | 95 | </vbox> |
michael@0 | 96 | </hbox> |
michael@0 | 97 | |
michael@0 | 98 | </window> |
michael@0 | 99 |