| <?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-pre.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> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |
| </html> |