Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / css-content-attribute.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <script>
4     function dumpAccessibilityChildren(element, level) {
5         if (element.stringValue.indexOf('End of test') >= 0)
6             return false;
7
8         var indent = "";
9         for (var k = 0; k < level; k++) { indent += "  "; }
10         debug(indent + element.role + " " + element.stringValue);
11         var childrenCount = element.childrenCount;
12         for (var k = 0; k < childrenCount; k++) {
13             if (!dumpAccessibilityChildren(element.childAtIndex(k), level+1))
14                 return false;
15         }
16         return true;
17     }
18 </script>
19 <head>
20 <script src="../resources/js-test-pre.js"></script>
21
22     <style type="text/css">
23
24         h1:before {
25             content: 'This is a';
26         }
27
28         h1:after {
29             content: 'Headline';
30         }
31
32     </style>
33
34 </head>
35 <body id="body">
36 <h1>SAMPLE</h1>
37 <div>End of test</div>
38 <p id="description"></p>
39 <div id="console"></div>
40
41 <script>
42
43     description("This tests that when the content attribute in CSS is used, the correct values are returned.");
44
45     if (window.accessibilityController) {
46           document.getElementById("body").focus();
47           dumpAccessibilityChildren(accessibilityController.focusedElement, 0);
48     }
49
50 </script>
51
52 <script src="../resources/js-test-post.js"></script>
53 </body>
54 </html>