tor-browser

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

test_range.html (1775B)


      1 <html>
      2 
      3 <head>
      4  <title>nsIAccessible value testing for input@type=range element</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="../value.js"></script>
     15 
     16  <script src="chrome://mochikit/content/chrome-harness.js"></script>
     17 
     18  <script type="application/javascript">
     19    function doTest() {
     20      // HTML5 progress element tests
     21      testValue("range", "50", 50, 0, 100, 1);
     22      testValue("range_value", "1", 1, 0, 100, 1);
     23      testValue("range_step", "50", 50, 0, 100, 1);
     24      testValue("range_min42", "71", 71, 42, 100, 1);
     25      testValue("range_max42", "21", 21, 0, 42, 1);
     26      testValue("range_valuetext", "value", 50, 0, 100, 1);
     27 
     28      SimpleTest.finish();
     29    }
     30 
     31    SimpleTest.waitForExplicitFinish();
     32    addA11yLoadEvent(doTest);
     33  </script>
     34 
     35 </head>
     36 
     37 <body>
     38 
     39  <a target="_blank"
     40     href="https://bugzilla.mozilla.org/show_bug.cgi?id=559764"
     41     title="make HTML5 input@type=range element accessible">
     42    Bug 559764
     43  </a>
     44  <p id="display"></p>
     45  <div id="content" style="display: none">
     46  </div>
     47  <pre id="test">
     48  </pre>
     49 
     50  <!-- HTML5 input@type=range element -->
     51  <input type="range" id="range">
     52  <input type="range" id="range_value" value="1">
     53  <input type="range" id="range_step" step="1">
     54  <input type="range" id="range_min42" min="42">
     55  <input type="range" id="range_max42" max="42">
     56  <!-- aria-valuetext should work due to implicit slider role (bug 1475376) -->
     57  <input type="range" id="range_valuetext" aria-valuetext="value">
     58 </body>
     59 </html>