accessible/tests/mochitest/value/test_progress.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html>
     3 <head>
     4   <title>nsIAccessible value testing for progress element</title>
     6   <link rel="stylesheet" type="text/css"
     7         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     9   <script type="application/javascript"
    10           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    12   <script type="application/javascript"
    13           src="../common.js"></script>
    14   <script type="application/javascript"
    15           src="../value.js"></script>
    17   <script type="application/javascript"
    18           src="chrome://mochikit/content/chrome-harness.js"></script>
    20   <script type="application/javascript">
    21     function doTest()
    22     {
    23       // HTML5 progress element tests
    24       testValue("pr_indeterminate", "", 0, 0, 1, 0);
    25       testValue("pr_zero", "0%", 0, 0, 1, 0);
    26       testValue("pr_zeropointfive", "50%", 0.5, 0, 1, 0);
    27       testValue("pr_one", "100%", 1, 0, 1, 0);
    28       testValue("pr_42", "100%", 42, 0, 1, 0);
    29       testValue("pr_21", "50%", 21, 0, 42, 0);
    31       SimpleTest.finish();
    32     }
    34     SimpleTest.waitForExplicitFinish();
    35     addA11yLoadEvent(doTest);
    36   </script>
    38 </head>
    40 <body>
    42   <a target="_blank"
    43      href="https://bugzilla.mozilla.org/show_bug.cgi?id=559773"
    44      title="make HTML5 progress element accessible">
    45     Mozilla Bug 559773
    46   </a><br />
    47   <p id="display"></p>
    48   <div id="content" style="display: none">
    49   </div>
    50   <pre id="test">
    51   </pre>
    53   <!-- HTML5 progress element -->
    54   <progress id="pr_indeterminate">this will be read by legacy browsers</progress>
    55   <progress id="pr_zero" value="0">this will be read by legacy browsers</progress>
    56   <progress id="pr_zeropointfive" value="0.5">this will be read by legacy browsers</progress>
    57   <progress id="pr_one" value="1">this will be read by legacy browsers</progress>
    58   <progress id="pr_42" value="42">this will be read by legacy browsers</progress>
    59   <progress id="pr_21" value="21" max="42">this will be read by legacy browsers</progress>
    60 </body>
    61 </html>

mercurial