tor-browser

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

test_aria.xhtml (2146B)


      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 ARIA state tests">
      8 
      9  <script type="application/javascript"
     10          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
     11 
     12  <script type="application/javascript"
     13          src="../common.js" />
     14  <script type="application/javascript"
     15          src="../role.js" />
     16  <script type="application/javascript"
     17          src="../states.js" />
     18 
     19  <script type="application/javascript">
     20  <![CDATA[
     21    function doTest()
     22    {
     23      // aria-pressed
     24      testStates("pressed_button", STATE_PRESSED, 0, STATE_CHECKABLE);
     25 
     26      testStates("tabs", STATE_MULTISELECTABLE);
     27      // Make sure XUL selection works, since aria-selected defaults to false.
     28      testStates("tab1", STATE_SELECTED);
     29      // aria-selected="true".
     30      testStates("tab2", STATE_SELECTED);
     31      // Neither.
     32      testStates("tab3", 0, 0, STATE_SELECTED);
     33 
     34      SimpleTest.finish()
     35    }
     36 
     37    SimpleTest.waitForExplicitFinish();
     38    addA11yLoadEvent(doTest);
     39  ]]>
     40  </script>
     41 
     42  <hbox flex="1" style="overflow: auto;">
     43    <body xmlns="http://www.w3.org/1999/xhtml">
     44     <a target="_blank"
     45         href="https://bugzilla.mozilla.org/show_bug.cgi?id=1033283"
     46         title="Expose pressed state on XUL menu toggle buttons">
     47        Mozilla Bug 1033283
     48     </a>
     49      <p id="display"></p>
     50      <div id="content" style="display: none">
     51      </div>
     52      <pre id="test">
     53      </pre>
     54    </body>
     55 
     56    <vbox flex="1">
     57      <button id="pressed_button" aria-pressed="true" label="I am pressed" />
     58 
     59      <tabbox>
     60        <tabs id="tabs" aria-multiselectable="true">
     61          <tab id="tab1" label="tab1" selected="true"/>
     62          <tab id="tab2" label="tab2" aria-selected="true"/>
     63          <tab id="tab3" label="tab3"/>
     64        </tabs>
     65      </tabbox>
     66    </vbox>
     67  </hbox>
     68 
     69 </window>