tor-browser

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

test_general.html (2970B)


      1 <html>
      2 
      3 <head>
      4  <title>nsIAccessible actions testing on HTML elements</title>
      5 
      6  <link rel="stylesheet" type="text/css"
      7        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
      8 
      9  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     10 
     11  <script type="application/javascript"
     12          src="../common.js"></script>
     13  <script type="application/javascript"
     14          src="../events.js"></script>
     15  <script type="application/javascript"
     16          src="../actions.js"></script>
     17 
     18  <script type="application/javascript">
     19    function doTest() {
     20      var actionsArray = [
     21        {
     22          ID: "li_clickable1",
     23          actionName: "click",
     24          events: CLICK_EVENTS,
     25        },
     26        {
     27          ID: "li_clickable2",
     28          actionName: "click",
     29          events: CLICK_EVENTS,
     30        },
     31        {
     32          ID: "li_clickable3",
     33          actionName: "click",
     34          events: CLICK_EVENTS,
     35        },
     36        {
     37          ID: "onclick_img",
     38          actionName: "click",
     39          events: CLICK_EVENTS,
     40        },
     41        {
     42          ID: "label1",
     43          actionName: "click",
     44          events: CLICK_EVENTS,
     45        },
     46 
     47      ];
     48 
     49      testActions(actionsArray);
     50 
     51      is(getAccessible("label1").firstChild.actionCount, 1, "label text should have 1 action");
     52 
     53      getAccessible("onclick_img").takeFocus();
     54      is(getAccessible("link1").actionCount, 1, "links should have one action");
     55      is(getAccessible("link2").actionCount, 1, "link with onclick handler should have 1 action");
     56    }
     57 
     58    SimpleTest.waitForExplicitFinish();
     59    addA11yLoadEvent(doTest);
     60  </script>
     61 </head>
     62 
     63 <body>
     64 
     65  <a target="_blank" rel="opener"
     66     href="https://bugzilla.mozilla.org/show_bug.cgi?id=523789"
     67     title="nsHTMLLiAccessible shouldn't be inherited from linkable accessible">
     68    Mozilla Bug 523789
     69  </a><br>
     70  <a target="_blank" rel="opener"
     71     href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
     72     title="Expose click action if mouseup and mousedown are registered">
     73    Mozilla Bug 423409
     74  </a>
     75  <a target="_blank" rel="opener"
     76     href="https://bugzilla.mozilla.org/show_bug.cgi?id=659620"
     77     title="hang when trying to edit a page on wikimo with NVDA running">
     78    Mozilla Bug 659620
     79  </a>
     80  <p id="display"></p>
     81  <div id="content" style="display: none"></div>
     82  <pre id="test">
     83  </pre>
     84 
     85  <ul>
     86    <li id="li_clickable1" onclick="">Clickable list item</li>
     87    <li id="li_clickable2" onmousedown="">Clickable list item</li>
     88    <li id="li_clickable3" onmouseup="">Clickable list item</li>
     89  </ul>
     90 
     91  <!-- linkable accessibles -->
     92  <img id="onclick_img" onclick="" src="../moz.png">
     93 
     94  <a id="link1" href="www">linkable textleaf accessible</a>
     95  <div id="link2" onclick="">linkable textleaf accessible</div>
     96 
     97  <div>
     98    <label for="TextBox_t2" id="label1">
     99      <span>Explicit</span>
    100    </label>
    101    <input name="in2" id="TextBox_t2" type="text" maxlength="17">
    102  </div>
    103 
    104 </body>
    105 </html>