Index: LayoutTests/fast/dom/StyleSheet/gc-parent-stylesheet.html |
diff --git a/LayoutTests/fast/dom/StyleSheet/gc-parent-stylesheet.html b/LayoutTests/fast/dom/StyleSheet/gc-parent-stylesheet.html |
index 518e15a6812cebd0eb724b0ee6018b94a6bdd53e..3bd3e182232202502d2a36a1c0a3f4eb947bff99 100644 |
--- a/LayoutTests/fast/dom/StyleSheet/gc-parent-stylesheet.html |
+++ b/LayoutTests/fast/dom/StyleSheet/gc-parent-stylesheet.html |
@@ -7,9 +7,20 @@ |
window.jsTestIsAsync = true; |
description("Test that CSS stylesheets don't lose custom properties on GC when only reachable through child rules."); |
+function createCSSStyleSheet() |
+{ |
+ style = document.createElement("style"); |
+ document.head.appendChild(style); |
+ shouldBeType("style.sheet", "CSSStyleSheet"); |
+ var sheet = style.sheet; |
+ document.head.removeChild(style); |
+ shouldBeNull("style.sheet"); |
+ return sheet; |
+} |
+ |
function test() |
{ |
- var sheet = document.implementation.createCSSStyleSheet("title", "screen"); |
+ var sheet = createCSSStyleSheet(); |
sheet.foo = "0"; |
sheet.insertRule("div { color:black }", 0); |
rule = sheet.rules[0]; |