blob: 37ebb55f2e6cf188d9f78aaf559ed167457718b2 [file] [log] [blame]
cfleizach@apple.com95edf432013-01-07 23:32:39 +00001<!DOCTYPE HTML>
2<html>
3<body>
mark.lam@apple.coma931ab22013-09-08 01:18:24 +00004<script src="../resources/js-test-pre.js"></script>
cfleizach@apple.com95edf432013-01-07 23:32:39 +00005
6<style>
7ol li::before { content: counter(l1) ":"; counter-increment: l1;}
8ol li { list-style-type: decimial; display: block; }
9</style>
10
11<div id="container" style="counter-reset:l1;">
12<ol style="list-style-type:decimal">
13<li id="line1">line1
14<li id="line2">line2
15<li>line3
16</ol>
17</div>
18
19<div id="description"></div>
20<div id="console"></div>
21
22<script>
23
24description("This tests that the text for RenderCounter is exposed correctly.")
25
26if (window.testRunner && window.accessibilityController) {
27
28 var line1 = accessibilityController.accessibleElementById("line1");
commit-queue@webkit.org463037b2015-01-15 12:20:45 +000029 if (accessibilityController.platformName != "atk") {
30 shouldBe("line1.childAtIndex(0).stringValue", "'AXValue: 1'");
31 shouldBe("line1.childAtIndex(1).stringValue", "'AXValue: :'");
32 shouldBe("line1.childAtIndex(2).stringValue", "'AXValue: line1'");
33 }
34 else
35 shouldBe("line1.stringValue", "'AXValue: 1 : line1'");
cfleizach@apple.com95edf432013-01-07 23:32:39 +000036
37 var line2 = accessibilityController.accessibleElementById("line2");
commit-queue@webkit.org463037b2015-01-15 12:20:45 +000038 if (accessibilityController.platformName != "atk") {
39 shouldBe("line2.childAtIndex(0).stringValue", "'AXValue: 2'");
40 shouldBe("line2.childAtIndex(1).stringValue", "'AXValue: :'");
41 shouldBe("line2.childAtIndex(2).stringValue", "'AXValue: line2'");
42 }
43 else
44 shouldBe("line2.stringValue", "'AXValue: 2 : line2'");
cfleizach@apple.com95edf432013-01-07 23:32:39 +000045
46 document.getElementById("container").style.display = "none";
47}
48
49</script>
50
mark.lam@apple.coma931ab22013-09-08 01:18:24 +000051<script src="../resources/js-test-post.js"></script>
cfleizach@apple.com95edf432013-01-07 23:32:39 +000052</body>
53</html>