tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_tabbox.xhtml (2733B)


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