Update device orientation & motion permission native SPI as per latest proposal
[WebKit-https.git] / LayoutTests / accessibility / aria-setsize-posinset.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <ul id="list">
9 <li aria-setsize="100" aria-posinset="3">3</li>
10 <li>4</li>
11 </ul>
12
13 <p id="description"></p>
14 <div id="console"></div>
15
16 <script>
17
18     description("This tests verifies that aria-posinset and aria-setsize are exposed to accessibility correctly.");
19
20     if (window.accessibilityController) {
21
22           var list = accessibilityController.accessibleElementById("list");
23
24           debug("Verify that the first item in the list exposes setsize and posinset attributes.");
25           shouldBeTrue("list.childAtIndex(0).isAttributeSupported('AXARIASetSize')");
26           shouldBeTrue("list.childAtIndex(0).isAttributeSupported('AXARIAPosInSet')");
27
28           debug("Verify that the first item in the list returns the correct value for setsize and posinset.");
29           shouldBe("list.childAtIndex(0).numberAttributeValue('AXARIASetSize')", "100");
30           shouldBe("list.childAtIndex(0).numberAttributeValue('AXARIAPosInSet')", "3");
31
32           debug("Verify that the second item in the list does not support setsize and posinset.");
33           shouldBeFalse("list.childAtIndex(1).isAttributeSupported('AXARIASetSize')");
34           shouldBeFalse("list.childAtIndex(1).isAttributeSupported('AXARIAPosInSet')");
35
36           document.getElementById("list").style.visibility = 'hidden';
37     }
38
39 </script>
40
41 <script src="../resources/js-test-post.js"></script>
42 </body>
43 </html>