Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / div-within-anchors-causes-crash.html
blob6188a64dad777a733a11d2b13cc6c69bec6135a9
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <!-- <script>
6 function buildAccessibilityTree(accessibilityObject, indent) {
7 var str = "";
8 for (var i = 0; i < indent; i++)
9 str += " ";
10 str += accessibilityObject.role;
11 str += " " + accessibilityObject.stringValue;
12 str += "\n";
13 document.getElementById("tree").innerText += str;
15 if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
16 return false;
18 var count = accessibilityObject.childrenCount;
19 for (var i = 0; i < count; ++i) {
20 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
21 return false;
24 return true;
26 </script> -->
27 <script src="../resources/js-test.js"></script>
28 <script src="../resources/accessibility-helper.js"></script>
29 </head>
30 <body>
32 <a><div></div></a>
34 <a><div></div></a>
36 <a href="about:blank"><div></div></a>
38 <div>End of test</div>
40 <p id="description"></p>
41 <div id="console"></div>
43 <script>
44 description("This can cause a crash.");
46 if (window.accessibilityController) {
47 // First build up full accessibility tree.
48 document.getElementById("console").innerText += "Before:\n";
49 document.body.focus();
50 buildAccessibilityTree(accessibilityController.focusedElement, 0);
52 // Remove anchor that causes debug assert in AccessibilityRenderObject::addChildren
53 document.body.removeChild(document.body.children[2])
55 // Build up full accessibility tree again.
56 document.getElementById("console").innerText += "After:\n";
57 document.body.focus();
58 buildAccessibilityTree(accessibilityController.focusedElement, 0);
61 </script>
63 </body>
64 </html>