accessible/tests/mochitest/tree/test_tabbox.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_tabbox.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,99 @@
     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 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.10 +        title="Accessible XUL tabbox hierarchy tests">
    1.11 +
    1.12 +  <script type="application/javascript"
    1.13 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
    1.14 +
    1.15 +  <script type="application/javascript"
    1.16 +          src="../common.js" />
    1.17 +  <script type="application/javascript"
    1.18 +          src="../role.js" />
    1.19 +
    1.20 +  <script type="application/javascript">
    1.21 +  <![CDATA[
    1.22 +    ////////////////////////////////////////////////////////////////////////////
    1.23 +    // Test
    1.24 +
    1.25 +    function doTest()
    1.26 +    {
    1.27 +      //////////////////////////////////////////////////////////////////////////
    1.28 +      // tabbox
    1.29 +
    1.30 +      var accTree = {
    1.31 +        role: ROLE_PAGETABLIST,
    1.32 +        children: [
    1.33 +          {
    1.34 +            role: ROLE_PAGETAB,
    1.35 +            children: []
    1.36 +          },
    1.37 +          {
    1.38 +            role: ROLE_PAGETAB,
    1.39 +            children: []
    1.40 +          }
    1.41 +        ]
    1.42 +      };
    1.43 +      testAccessibleTree("tabs", accTree);
    1.44 +
    1.45 +      accTree = {
    1.46 +        role: ROLE_PANE,
    1.47 +        children: [
    1.48 +          {
    1.49 +            role: ROLE_PROPERTYPAGE,
    1.50 +            children: []
    1.51 +          },
    1.52 +          {
    1.53 +            role: ROLE_PROPERTYPAGE,
    1.54 +            children: []
    1.55 +          }
    1.56 +        ]
    1.57 +      };
    1.58 +      testAccessibleTree("tabpanels", accTree);
    1.59 +
    1.60 +      SimpleTest.finish()
    1.61 +    }
    1.62 +
    1.63 +    SimpleTest.waitForExplicitFinish();
    1.64 +    addA11yLoadEvent(doTest);
    1.65 +  ]]>
    1.66 +  </script>
    1.67 +
    1.68 +  <hbox flex="1" style="overflow: auto;">
    1.69 +    <body xmlns="http://www.w3.org/1999/xhtml">
    1.70 +      <a target="_blank"
    1.71 +         href="https://bugzilla.mozilla.org/show_bug.cgi?id=540389"
    1.72 +         title=" WARNING: Bad accessible tree!: [tabbrowser tab] ">
    1.73 +        Mozilla Bug 540389
    1.74 +      </a><br/>
    1.75 +      <a target="_blank"
    1.76 +         href="https://bugzilla.mozilla.org/show_bug.cgi?id=552944"
    1.77 +         title="No relationship between tabs and associated property page in new tabbrowser construct">
    1.78 +        Mozilla Bug 552944
    1.79 +      </a><br/>
    1.80 +      <p id="display"></p>
    1.81 +      <div id="content" style="display: none">
    1.82 +      </div>
    1.83 +      <pre id="test">
    1.84 +      </pre>
    1.85 +    </body>
    1.86 +
    1.87 +    <vbox flex="1">
    1.88 +      <tabbox>
    1.89 +        <tabs id="tabs">
    1.90 +          <tab label="tab1"/>
    1.91 +          <tab label="tab2"/>
    1.92 +        </tabs>
    1.93 +        <tabpanels id="tabpanels">
    1.94 +          <tabpanel/>
    1.95 +          <tabpanel/>
    1.96 +        </tabpanels>
    1.97 +      </tabbox>
    1.98 +    </vbox>
    1.99 +  </hbox>
   1.100 +
   1.101 +</window>
   1.102 +

mercurial