accessible/tests/mochitest/elm/test_listbox.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/elm/test_listbox.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,74 @@
     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="XUL listbox element test.">
    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"></script>
    1.17 +  <script type="application/javascript"
    1.18 +          src="../role.js"></script>
    1.19 +
    1.20 +  <script type="application/javascript">
    1.21 +  <![CDATA[
    1.22 +    function doTest()
    1.23 +    {
    1.24 +      var id = "";
    1.25 +      var listbox = null, acc = null;
    1.26 +
    1.27 +      //////////////////////////////////////////////////////////////////////////
    1.28 +      // Simple listbox. There is no nsIAccessibleTable interface.
    1.29 +
    1.30 +      id = "listbox1";
    1.31 +      acc = getAccessible(id);
    1.32 +
    1.33 +      // query nsIAccessibleTable
    1.34 +      try {
    1.35 +        acc.QueryInterface(nsIAccessibleTable);
    1.36 +        ok(false,
    1.37 +           id + " shouldn't implement nsIAccessibleTable interface.");
    1.38 +      } catch(e) {
    1.39 +        ok(true, id + " doesn't implement nsIAccessibleTable interface.");
    1.40 +      }
    1.41 +
    1.42 +      // role
    1.43 +      testRole(id, ROLE_LISTBOX);
    1.44 +
    1.45 +      SimpleTest.finish();
    1.46 +    }
    1.47 +
    1.48 +    SimpleTest.waitForExplicitFinish();
    1.49 +    addA11yLoadEvent(doTest);
    1.50 +  ]]>
    1.51 +  </script>
    1.52 +
    1.53 +  <hbox style="overflow: auto;">
    1.54 +  <body xmlns="http://www.w3.org/1999/xhtml">
    1.55 +    <a target="_blank"
    1.56 +       href="https://bugzilla.mozilla.org/show_bug.cgi?id=418371"
    1.57 +       title="implement the rest of methods of nsIAccessibleTable on xul:listbox">
    1.58 +      Mozilla Bug 418371
    1.59 +    </a>
    1.60 +    <p id="display"></p>
    1.61 +    <div id="content" style="display: none">
    1.62 +    </div>
    1.63 +    <pre id="test">
    1.64 +    </pre>
    1.65 +  </body>
    1.66 +
    1.67 +  <vbox flex="1">
    1.68 +    <label control="listbox1" value="listbox: "/>
    1.69 +    <listbox id="listbox1">
    1.70 +      <listitem label="item1" id="item1"/>
    1.71 +      <listitem label="item2" id="item2"/>
    1.72 +    </listbox>
    1.73 +  </vbox>
    1.74 +  </hbox>
    1.75 +
    1.76 +</window>
    1.77 +

mercurial