blob: 3cf7f00df40ee3e88d794c0d545d3107d8669283 [file] [log] [blame]
<html>
<link rel="stylesheet" type="text/css" src="theme.css"/>
<script>
function runTest() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var linkElement = document.getElementsByTagName('link')[0];
var styleSheet = linkElement.sheet;
// delete link element
linkElement.parentNode.removeChild(linkElement);
linkElement = null;
if (window.gc) {
window.gc();
} else if (GCController) {
GCController.collect();
} else {
for (var i = 0; i < 10000; i++)
new Object();
}
styleSheet.ownerNode.cloneNode();
document.getElementById("result").innerHTML = "Test passed.";
}
</script>
<body onload="runTest()">
<p>
This test verifies that style sheet do not outlive their elements.
Since you can get back to the element with the ownerNode attribute,
it's important to keep the element alive.
</p>
<p id="result">TEST HAS NOT RUN YET.</p>
</body>
</html>