accessible/tests/mochitest/value/test_progress.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:0029236d3bb0
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 type="application/javascript"
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11
12 <script type="application/javascript"
13 src="../common.js"></script>
14 <script type="application/javascript"
15 src="../value.js"></script>
16
17 <script type="application/javascript"
18 src="chrome://mochikit/content/chrome-harness.js"></script>
19
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);
30
31 SimpleTest.finish();
32 }
33
34 SimpleTest.waitForExplicitFinish();
35 addA11yLoadEvent(doTest);
36 </script>
37
38 </head>
39
40 <body>
41
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>
52
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