blob: 11104ad67367e36ec0b96b813f8b956bb5b20b99 [file] [log] [blame]
<?xml-stylesheet href="resources/detached-style.css" title="testSheet"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
<link rel="stylesheet" href="resources/detached-style.css" type="text/css" title="testSheet"/>
<style title="testSheet">
* { }
</style>
<script src="../../../resources/js-test.js"></script>
</head>
<body onload="start()">
<script>
window.jsTestIsAsync = true;
description("Test that custom properties on stylesheets survive GC");
function test(expr)
{
shouldBe(expr + ".title", "'testSheet'");
eval(expr).foo = "bar";
gc();
shouldBe(expr + ".foo", "'bar'");
}
function start()
{
test("document.firstChild.sheet");
test("document.getElementsByTagName('link')[0].sheet");
test("document.getElementsByTagName('style')[0].sheet");
finishJSTest();
}
</script>
</body>
</html>