Write a tool to bisect WebKit builds
[WebKit-https.git] / LayoutTests / accessibility / add-children-pseudo-element.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
7 <style>
8 .pseudo::after {
9   content: url(resources/svg-circle.svg);
10   width: 18px;
11   height: 20px;
12   position: absolute;
13   margin-top: 6px;
14   right: 6px
15 }
16
17 .pseudo.hidden::after {
18     content: ' ';
19 }
20 </style>
21
22 <body id="body">
23
24 <div id="container">
25 <div id="test" style="float : left;">
26 <span>Language</span>
27 <input id="test">
28 </div>
29
30 <div id="float" style="display: inline-block;" class="pseudo">
31 <span required="" style="color: rgb(194, 0, 0);">Email</span>
32 <input type="text" required="" aria-required="true" value="" onkeyup="hidePseudo();">
33 </div>
34
35 </div>
36
37 <p id="description"></p>
38 <div id="console"></div>
39
40 <script>
41
42     description("Make sure that we are updating the render block flow element's children correctly.");
43
44     if (window.accessibilityController) {
45         var element = accessibilityController.accessibleElementById("float");
46         shouldBe("element.childrenCount", "3");
47         
48         eventSender.keyDown('\t');
49         eventSender.keyDown('\t');
50         
51         shouldBe("element.childrenCount", "2");
52         showPseudo();
53         
54         function hidePseudo() {
55             document.getElementById("float").className += "hidden"
56         }
57         
58         function showPseudo() {
59             document.getElementById("float").className = "pseudo";
60         }
61                 
62         // Make sure getting the attributes of its children won't cause crash
63         element.attributesOfChildren();
64     }
65
66 </script>
67
68 <script src="../resources/js-test-post.js"></script>
69 </body>
70 </html>