accessible/tests/mochitest/tree/test_button.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_button.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,73 @@
     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 button 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 +      // button
    1.29 +
    1.30 +      var accTree = {
    1.31 +        role: ROLE_PUSHBUTTON,
    1.32 +        name: "hello",
    1.33 +        children: [ ]
    1.34 +      };
    1.35 +      testAccessibleTree("button1", accTree);
    1.36 +
    1.37 +      //////////////////////////////////////////////////////////////////////////
    1.38 +      // toolbarbutton
    1.39 +
    1.40 +      var accTree = {
    1.41 +        role: ROLE_PUSHBUTTON,
    1.42 +        name: "hello",
    1.43 +        children: [ ]
    1.44 +      };
    1.45 +      testAccessibleTree("button2", accTree);
    1.46 +
    1.47 +      SimpleTest.finish()
    1.48 +    }
    1.49 +
    1.50 +    SimpleTest.waitForExplicitFinish();
    1.51 +    addA11yLoadEvent(doTest);
    1.52 +  ]]>
    1.53 +  </script>
    1.54 +
    1.55 +  <hbox flex="1" style="overflow: auto;">
    1.56 +    <body xmlns="http://www.w3.org/1999/xhtml">
    1.57 +      <a target="_blank"
    1.58 +         href="https://bugzilla.mozilla.org/show_bug.cgi?id=249292"
    1.59 +         title="Ensure accessible children for toolbarbutton types 'menu' and 'menu-button'">
    1.60 +        Mozilla Bug 249292
    1.61 +      </a><br/>
    1.62 +      <p id="display"></p>
    1.63 +      <div id="content" style="display: none">
    1.64 +      </div>
    1.65 +      <pre id="test">
    1.66 +      </pre>
    1.67 +    </body>
    1.68 +
    1.69 +    <vbox flex="1">
    1.70 +      <button id="button1" label="hello"/>
    1.71 +      <toolbarbutton id="button2" label="hello"/>
    1.72 +    </vbox>
    1.73 +  </hbox>
    1.74 +
    1.75 +</window>
    1.76 +

mercurial