summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/shadow/remove-shadowroot-from-document-and-destroy-crash.html
blob: 2ea048e5f14bb3cb62fe4fe3e75c02dace0a3404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<meta content="style-src 'sha1-eYyYGmKWdhpUewohaXk9o8IaLSw='" http-equiv="Content-Security-Policy"/>
<head>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

onload = function() {
    div1.createShadowRoot().innerHTML="<style>";
    var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
    var doc = document.implementation.createDocument("", null);
    doc.appendChild(svgDoc.documentElement);
    svgDoc.appendChild(div1);
    svgDoc.replaceChild(doc.documentElement, svgDoc.childNodes[0]);
    gc();
    document.write("PASS");
}
</script>
</head>
<body>
<div id="div1"></div>
</body>