Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / removed-anonymous-block-child-causes-crash.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">\r
2 <html>\r
3 <head>\r
4 <script>\r
5 \r
6     function removeElement() {\r
7         document.getElementById('div').removeChild(document.getElementById('div').children[2]);\r
8     }\r
9 \r
10     function queryIsEnabledOnDecendants(accessibilityObject) {\r
11         if (!accessibilityObject)\r
12             return;\r
13         accessibilityObject.isEnabled\r
14 \r
15         var count = accessibilityObject.childrenCount;\r
16         for (var i = 0; i < count; ++i)\r
17             queryIsEnabledOnDecendants(accessibilityObject.childAtIndex(i));\r
18     }\r
19 </script>\r
20 <script src="../resources/js-test-pre.js"></script>\r
21 </head>\r
22 <body>\r
23 \r
24 <div id="div">\r
25   <span>\r
26     <div>a</div>\r
27   </span>\r
28   <div style="float:left">a</div>\r
29   <span title="title">b</span>\r
30 </div>\r
31 \r
32 <p id="description"></p>\r
33 <div id="console"></div>\r
34 \r
35 <script>\r
36     description("In certain cases removing a decendent from an anonymous block element does not update the parent chain correctly. This can cause a crash.");\r
37 \r
38     if (window.accessibilityController) {\r
39         // First build up full accessibility tree.\r
40         document.body.focus();\r
41         queryIsEnabledOnDecendants(accessibilityController.focusedElement);\r
42         \r
43         removeElement()\r
44         \r
45         // Now call isEnabled on each accessibility object.\r
46         document.body.focus();\r
47         queryIsEnabledOnDecendants(accessibilityController.focusedElement);\r
48     }\r
49 \r
50 </script>\r
51 \r
52 <script src="../resources/js-test-post.js"></script>\r
53 </body>\r
54 </html>\r