accessible/tests/mochitest/actions/test_select.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/actions/test_select.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,105 @@
     1.4 +<html>
     1.5 +
     1.6 +<head>
     1.7 +  <title>nsIAccessible actions testing for HTML select</title>
     1.8 +
     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 +  <script type="application/javascript"
    1.20 +          src="../states.js"></script>
    1.21 +  <script type="application/javascript"
    1.22 +          src="../events.js"></script>
    1.23 +  <script type="application/javascript"
    1.24 +          src="../actions.js"></script>
    1.25 +
    1.26 +  <script type="application/javascript">
    1.27 +    //gA11yEventDumpToConsole = true; // debugging
    1.28 +    function doTest()
    1.29 +    {
    1.30 +      var actionsArray = [
    1.31 +        {
    1.32 +          ID: "lb_apple",
    1.33 +          actionIndex: 0,
    1.34 +          actionName: "select",
    1.35 +          events: CLICK_EVENTS,
    1.36 +          eventSeq: [
    1.37 +            new focusChecker("lb_apple")
    1.38 +          ]
    1.39 +        },
    1.40 +        {
    1.41 +          ID: "combobox",
    1.42 +          actionIndex: 0,
    1.43 +          actionName: "open",
    1.44 +          events: CLICK_EVENTS,
    1.45 +          eventSeq: [
    1.46 +            new focusChecker("cb_orange")
    1.47 +          ]
    1.48 +        },
    1.49 +        {
    1.50 +          ID: "cb_apple",
    1.51 +          actionIndex: 0,
    1.52 +          actionName: "select",
    1.53 +          events: CLICK_EVENTS,
    1.54 +          eventSeq: [
    1.55 +            new focusChecker("combobox")
    1.56 +          ]
    1.57 +        },
    1.58 +        {
    1.59 +          ID: "combobox",
    1.60 +          actionIndex: 0,
    1.61 +          actionName: "open",
    1.62 +          events: CLICK_EVENTS,
    1.63 +          eventSeq: [
    1.64 +            new focusChecker("cb_apple")
    1.65 +          ]
    1.66 +        },
    1.67 +        {
    1.68 +          ID: "combobox",
    1.69 +          actionIndex: 0,
    1.70 +          actionName: "close",
    1.71 +          events: CLICK_EVENTS,
    1.72 +          eventSeq: [
    1.73 +            new focusChecker("combobox")
    1.74 +          ]
    1.75 +        }
    1.76 +      ];
    1.77 +
    1.78 +      testActions(actionsArray);
    1.79 +    }
    1.80 +
    1.81 +    SimpleTest.waitForExplicitFinish();
    1.82 +    addA11yLoadEvent(doTest);
    1.83 +  </script>
    1.84 +</head>
    1.85 +
    1.86 +<body>
    1.87 +
    1.88 +  <a target="_blank"
    1.89 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=673958"
    1.90 +     title="Rework accessible focus handling">
    1.91 +    Mozilla Bug 673958
    1.92 +  </a>
    1.93 +  <p id="display"></p>
    1.94 +  <div id="content" style="display: none"></div>
    1.95 +  <pre id="test">
    1.96 +  </pre>
    1.97 +
    1.98 +  <select id="listbox" size="2">
    1.99 +    <option id="lb_orange">orange</option>
   1.100 +    <option id="lb_apple">apple</option>
   1.101 +  </select>
   1.102 +
   1.103 +  <select id="combobox">
   1.104 +    <option id="cb_orange">orange</option>
   1.105 +    <option id="cb_apple">apple</option>
   1.106 +  </select>
   1.107 +</body>
   1.108 +</html>

mercurial