summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html
blob: 7ee5afa2976dab35f22dbe869a4d002b4e63f73b (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
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
Test passes if it does not crash.
<div id="console"></div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

iframe1 = document.createElement('iframe');
document.body.appendChild(iframe1);
document1 = iframe1.contentDocument.implementation.createHTMLDocument("document");
var div1 = document1.createElement('div');
div1.style.color = "blue";
var div2 = div1.cloneNode(true);
delete document1;
gc();
div2.style.color = "red";

</script>
</body>
</html>