tor-browser

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

test_progress.html (2124B)


      1 <html>
      2 
      3 <head>
      4  <title>nsIAccessible value testing for progress 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("pr_indeterminate", "", 0, 0, 1, 0);
     22      testValue("pr_zero", "0%", 0, 0, 1, 0);
     23      testValue("pr_zeropointfive", "50%", 0.5, 0, 1, 0);
     24      testValue("pr_one", "100%", 1, 0, 1, 0);
     25      testValue("pr_42", "100%", 42, 0, 1, 0);
     26      testValue("pr_21", "50%", 21, 0, 42, 0);
     27      testValue("pr_valuetext", "value", 0, 0, 1, 0);
     28 
     29      SimpleTest.finish();
     30    }
     31 
     32    SimpleTest.waitForExplicitFinish();
     33    addA11yLoadEvent(doTest);
     34  </script>
     35 
     36 </head>
     37 
     38 <body>
     39 
     40  <a target="_blank"
     41     href="https://bugzilla.mozilla.org/show_bug.cgi?id=559773"
     42     title="make HTML5 progress element accessible">
     43    Mozilla Bug 559773
     44  </a><br />
     45  <p id="display"></p>
     46  <div id="content" style="display: none">
     47  </div>
     48  <pre id="test">
     49  </pre>
     50 
     51  <!-- HTML5 progress element -->
     52  <progress id="pr_indeterminate">this will be read by legacy browsers</progress>
     53  <progress id="pr_zero" value="0">this will be read by legacy browsers</progress>
     54  <progress id="pr_zeropointfive" value="0.5">this will be read by legacy browsers</progress>
     55  <progress id="pr_one" value="1">this will be read by legacy browsers</progress>
     56  <progress id="pr_42" value="42">this will be read by legacy browsers</progress>
     57  <progress id="pr_21" value="21" max="42">this will be read by legacy browsers</progress>
     58  <!-- aria-valuetext should work due to implicit progressbar role (bug 1475376) -->
     59  <progress id="pr_valuetext" aria-valuetext="value">this will be read by legacy browsers</progress>
     60 </body>
     61 </html>