accessible/tests/mochitest/tree/test_tabbox.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

     1 <?xml version="1.0"?>
     2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
     4                  type="text/css"?>
     6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     7         title="Accessible XUL tabbox hierarchy tests">
     9   <script type="application/javascript"
    10           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
    12   <script type="application/javascript"
    13           src="../common.js" />
    14   <script type="application/javascript"
    15           src="../role.js" />
    17   <script type="application/javascript">
    18   <![CDATA[
    19     ////////////////////////////////////////////////////////////////////////////
    20     // Test
    22     function doTest()
    23     {
    24       //////////////////////////////////////////////////////////////////////////
    25       // tabbox
    27       var accTree = {
    28         role: ROLE_PAGETABLIST,
    29         children: [
    30           {
    31             role: ROLE_PAGETAB,
    32             children: []
    33           },
    34           {
    35             role: ROLE_PAGETAB,
    36             children: []
    37           }
    38         ]
    39       };
    40       testAccessibleTree("tabs", accTree);
    42       accTree = {
    43         role: ROLE_PANE,
    44         children: [
    45           {
    46             role: ROLE_PROPERTYPAGE,
    47             children: []
    48           },
    49           {
    50             role: ROLE_PROPERTYPAGE,
    51             children: []
    52           }
    53         ]
    54       };
    55       testAccessibleTree("tabpanels", accTree);
    57       SimpleTest.finish()
    58     }
    60     SimpleTest.waitForExplicitFinish();
    61     addA11yLoadEvent(doTest);
    62   ]]>
    63   </script>
    65   <hbox flex="1" style="overflow: auto;">
    66     <body xmlns="http://www.w3.org/1999/xhtml">
    67       <a target="_blank"
    68          href="https://bugzilla.mozilla.org/show_bug.cgi?id=540389"
    69          title=" WARNING: Bad accessible tree!: [tabbrowser tab] ">
    70         Mozilla Bug 540389
    71       </a><br/>
    72       <a target="_blank"
    73          href="https://bugzilla.mozilla.org/show_bug.cgi?id=552944"
    74          title="No relationship between tabs and associated property page in new tabbrowser construct">
    75         Mozilla Bug 552944
    76       </a><br/>
    77       <p id="display"></p>
    78       <div id="content" style="display: none">
    79       </div>
    80       <pre id="test">
    81       </pre>
    82     </body>
    84     <vbox flex="1">
    85       <tabbox>
    86         <tabs id="tabs">
    87           <tab label="tab1"/>
    88           <tab label="tab2"/>
    89         </tabs>
    90         <tabpanels id="tabpanels">
    91           <tabpanel/>
    92           <tabpanel/>
    93         </tabpanels>
    94       </tabbox>
    95     </vbox>
    96   </hbox>
    98 </window>

mercurial