tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / platform / mac / accessibility / progressbar.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <span tabindex="0" role="progressbar" id="progressbar1" aria-valuenow=7 aria-valuemin=0 aria-valuemax=10>X</span>
9 <span tabindex="0" role="progressbar" id="progressbar2" aria-valuemax=10>X</span>
10
11 <progress tabindex="0" id="progressbar3" value=7 max=10></progress>
12 <progress tabindex="0" id="progressbar4"></progress>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This test makes sure that progress element can be accessed by Accessibility FW.");
20
21     if (window.accessibilityController) {
22
23           // ARIA determinate progressbar
24           document.getElementById("progressbar1").focus();
25           var obj = accessibilityController.focusedElement;
26
27           shouldBe("obj.intValue", "7");
28
29           // ARIA indeterminate progressbar 
30           document.getElementById("progressbar2").focus();
31           var obj = accessibilityController.focusedElement;
32
33           shouldBe("obj.intValue", "0");
34
35           // determinate progress element
36           document.getElementById("progressbar3").focus();
37           var obj = accessibilityController.focusedElement;
38
39           shouldBe("obj.intValue", "7");
40           shouldBe("obj.role", "'AXRole: AXProgressIndicator'");
41
42           // indeterminate progress element
43           document.getElementById("progressbar4").focus();
44           var obj = accessibilityController.focusedElement;
45
46           shouldBe("obj.intValue", "0");
47           shouldBe("obj.role", "'AXRole: AXProgressIndicator'");
48     }
49
50 </script>
51
52 <script src="../../../fast/js/resources/js-test-post.js"></script>
53 </body>
54 </html>