Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / table-destroyed-crash.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script>
5     function createAXObjects(accessibilityObject) {
6         var count = accessibilityObject.childrenCount;
7         for (var i = 0; i < count; ++i)
8             createAXObjects(accessibilityObject.childAtIndex(i));
9     }
10 </script>
11 <script src="../resources/js-test-pre.js"></script>
12 </head>
13 <body id="body">
14 <table id="table">
15   <tr id="row"><td id="cell">foo</td></tr>
16   <tr><td>bar</td></tr>
17 </table>
18 <script>
19
20     description("This tests that we do not crash when a table is destroyed.");
21
22     if (window.accessibilityController) {
23         document.body.focus();
24         var body = accessibilityController.focusedElement;
25         createAXObjects(body);
26     }
27
28     var element = document.getElementById("table");
29     element.parentNode.removeChild(element);
30
31 </script>
32
33 <script src="../resources/js-test-post.js"></script>
34 </body>
35 </html>
36