Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: LayoutTests/fast/dom/StyleSheet/gc-parent-stylesheet.html

Issue 238303004: Remove DOMImplementation.createCSSStyleSheet() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update tests Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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];

Powered by Google App Engine
This is Rietveld 408576698