accessible/tests/mochitest/tree/test_formctrl.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/tree/test_formctrl.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,132 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +
     1.7 +<head>
     1.8 +  <title>HTML form controls tests</title>
     1.9 +  <link rel="stylesheet" type="text/css"
    1.10 +        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.11 +
    1.12 +  <script type="application/javascript"
    1.13 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    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 +    function doTest()
    1.22 +    {
    1.23 +      // input@type="checkbox"
    1.24 +      var accTree = {
    1.25 +        role: ROLE_CHECKBUTTON,
    1.26 +        children: [ ]
    1.27 +      };
    1.28 +
    1.29 +      testAccessibleTree("checkbox", accTree);
    1.30 +
    1.31 +      // input@type="radio"
    1.32 +      accTree = {
    1.33 +        role: ROLE_RADIOBUTTON,
    1.34 +        children: [ ]
    1.35 +      };
    1.36 +
    1.37 +      testAccessibleTree("radio", accTree);
    1.38 +
    1.39 +      // input@type="button" and input@type="submit"
    1.40 +      // button
    1.41 +      accTree = {
    1.42 +        role: ROLE_PUSHBUTTON,
    1.43 +        children: [
    1.44 +          {
    1.45 +            role: ROLE_TEXT_LEAF // XXX Bug 567203
    1.46 +          }
    1.47 +        ]
    1.48 +      };
    1.49 +
    1.50 +      testAccessibleTree("btn1", accTree);
    1.51 +      testAccessibleTree("submit", accTree);
    1.52 +      testAccessibleTree("btn2", accTree);
    1.53 +
    1.54 +      // input@type="image"
    1.55 +      accTree = {
    1.56 +        role: ROLE_PUSHBUTTON,
    1.57 +        children: [
    1.58 +          {
    1.59 +            role: ROLE_STATICTEXT
    1.60 +          }
    1.61 +        ]
    1.62 +      };
    1.63 +      testAccessibleTree("image_submit", accTree);
    1.64 +
    1.65 +      // input@type="range"
    1.66 +      accTree = { SLIDER: [ ] };
    1.67 +      testAccessibleTree("range", accTree);
    1.68 +
    1.69 +      // input@type="number"
    1.70 +      accTree =
    1.71 +        { SPINBUTTON: [
    1.72 +          { ENTRY: [ ] },
    1.73 +          { PUSHBUTTON: [ ] },
    1.74 +          { PUSHBUTTON: [ ] }
    1.75 +        ] };
    1.76 +      testAccessibleTree("number", accTree);
    1.77 +
    1.78 +      // output
    1.79 +      accTree = {
    1.80 +        role: ROLE_SECTION,
    1.81 +        children: [
    1.82 +          {
    1.83 +            role: ROLE_TEXT_LEAF
    1.84 +          }
    1.85 +        ]
    1.86 +      };
    1.87 +      testAccessibleTree("output", accTree);
    1.88 +
    1.89 +      SimpleTest.finish();
    1.90 +    }
    1.91 +
    1.92 +    SimpleTest.waitForExplicitFinish();
    1.93 +    addA11yLoadEvent(doTest);
    1.94 +  </script>
    1.95 +</head>
    1.96 +<body>
    1.97 +
    1.98 +  <a target="_blank"
    1.99 +     title="Fix O(n^2) access to all the children of a container"
   1.100 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045">
   1.101 +    Bug 342045
   1.102 +  </a>
   1.103 +  <a target="_blank"
   1.104 +    title="add test for role of input type='image'"
   1.105 +    href="https://bugzilla.mozilla.org/show_bug.cgi?id=524521">
   1.106 +     Bug 524521
   1.107 +  </a>
   1.108 +  <a target="_blank"
   1.109 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=558036"
   1.110 +     title="make HTML <output> accessible">
   1.111 +    Bug 558036
   1.112 +  </a>
   1.113 +  <a target="_blank"
   1.114 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=559764"
   1.115 +     title="make HTML5 input@type=range element accessible">
   1.116 +    Bug 559764
   1.117 +  </a>
   1.118 +  <p id="display"></p>
   1.119 +  <div id="content" style="display: none"></div>
   1.120 +  <pre id="test">
   1.121 +  </pre>
   1.122 +
   1.123 +  <input type="checkbox" id="checkbox">
   1.124 +  <input type="radio" id="radio">
   1.125 +  <input type="button" value="button" id="btn1">
   1.126 +  <button id="btn2">button</button>
   1.127 +
   1.128 +  <input type="submit" id="submit">
   1.129 +  <input type="image" id="image_submit">
   1.130 +  <input type="range" id="range">
   1.131 +  <input type="number" id="number">
   1.132 +  <output id="output">1337</output>
   1.133 +
   1.134 +</body>
   1.135 +</html>

mercurial