JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / accessibility / aria-hidden-updates-alldescendants.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div>
9         <h1 id="heading">Steps</h1>
10
11         <main id="main" tabindex=0>
12          test
13                 <div tabindex="-1" class="step-one" aria-hidden="true"><span>Step 1: Do something</span></div>
14                 <div tabindex="-1" class="step-two" aria-hidden="true"><span>Step 2: Do another thing</span></div>
15                 <div tabindex="-1" class="step-three" aria-hidden="true"><span>Step 3: Do one last thing</span></div>
16         </main>
17
18 </div>
19
20
21 <p id="description"></p>
22 <div id="console"></div>
23
24 <script>
25
26     description("This tests that if aria-hidden changes on an element, all it's existing children will update their children caches");
27
28     if (window.accessibilityController) {
29           document.getElementById("main").focus();
30           
31           var main = accessibilityController.focusedElement;
32           // Access the element so the children cache is generated.
33           main.childAtIndex(0);
34           main.childAtIndex(1);
35           shouldBe("main.childrenCount", "1");
36
37           var group = document.getElementsByTagName('main')[0];
38           var items = group.getElementsByTagName('div');          
39           items[0].removeAttribute('aria-hidden');
40
41           // After removing aria-hidden, the new count should be 2.
42           shouldBe("main.childrenCount", "2");          
43           
44           // And most importantly, the DIV that was made non-hidden should have one child now.
45           shouldBe("main.childAtIndex(1).childrenCount", "1");
46     }
47
48 </script>
49
50 <script src="../fast/js/resources/js-test-post.js"></script>
51 </body>
52 </html>