summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/accessibility/removed-continuation-element-causes-crash.html
blob: dc1f37e9f99b150a1d481d722aa53f5f0113ead6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script>

function removeElement() {
   document.getElementById("h3").parentNode.removeChild(document.getElementById("h3"));
}

</script>
<script src="../fast/js/resources/js-test-pre.js"></script>
</head>
<body>

<A href="#" tabindex=0 id="link">
<h3 id="h3">asdfasdf</h3>
<img src="asdf.gif" width=100 height=100>
asdfasdf
</a>


<p id="description"></p>
<div id="console"></div>

<script>

    description("When you have elements that are continuations, and one of those elements is removed, the parent chain is not being updated accordingly. This can cause a crash.");

    if (window.accessibilityController) {

        document.getElementById("link").focus();
        var link = accessibilityController.focusedElement;
        link.attributesOfChildren();

        removeElement();

        // should not cause a crash...
        link.attributesOfChildren();
    }

</script>

<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>