cfleizach@apple.com | 95edf43 | 2013-01-07 23:32:39 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML> |
| 2 | <html> |
| 3 | <body> |
mark.lam@apple.com | a931ab2 | 2013-09-08 01:18:24 +0000 | [diff] [blame] | 4 | <script src="../resources/js-test-pre.js"></script> |
cfleizach@apple.com | 95edf43 | 2013-01-07 23:32:39 +0000 | [diff] [blame] | 5 | |
| 6 | <style> |
| 7 | ol li::before { content: counter(l1) ":"; counter-increment: l1;} |
| 8 | ol 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 | |
| 24 | description("This tests that the text for RenderCounter is exposed correctly.") |
| 25 | |
| 26 | if (window.testRunner && window.accessibilityController) { |
| 27 | |
| 28 | var line1 = accessibilityController.accessibleElementById("line1"); |
commit-queue@webkit.org | 463037b | 2015-01-15 12:20:45 +0000 | [diff] [blame] | 29 | 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.com | 95edf43 | 2013-01-07 23:32:39 +0000 | [diff] [blame] | 36 | |
| 37 | var line2 = accessibilityController.accessibleElementById("line2"); |
commit-queue@webkit.org | 463037b | 2015-01-15 12:20:45 +0000 | [diff] [blame] | 38 | 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.com | 95edf43 | 2013-01-07 23:32:39 +0000 | [diff] [blame] | 45 | |
| 46 | document.getElementById("container").style.display = "none"; |
| 47 | } |
| 48 | |
| 49 | </script> |
| 50 | |
mark.lam@apple.com | a931ab2 | 2013-09-08 01:18:24 +0000 | [diff] [blame] | 51 | <script src="../resources/js-test-post.js"></script> |
cfleizach@apple.com | 95edf43 | 2013-01-07 23:32:39 +0000 | [diff] [blame] | 52 | </body> |
| 53 | </html> |