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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLElement/class-list-gc.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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: third_party/WebKit/LayoutTests/fast/dom/HTMLElement/class-list-gc.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/class-list-gc.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/class-list-gc.html
index d954603e47f83d5a1653f9d16c9852a5b38c4c73..823f8b5881f860c6d98047213c9e419a3e5edf4b 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/class-list-gc.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/class-list-gc.html
@@ -1,9 +1,38 @@
-<!DOCTYPE html>
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/class-list-gc.js"></script>
+<script>
+description('This tests that properties on the classList persists GC.');
+
+function gc()
+{
+ if (window.GCController)
+ return GCController.collect();
+
+ for (var i = 0; i < 10000; i++) {
+ var s = new String;
+ }
+}
+
+var d = document.createElement('div');
+
+// Ensure the classList is created.
+var classList = d.classList;
+
+// Set a custom property.
+d.classList.life = 42;
+shouldEvaluateTo('d.classList.life', 42);
+
+// Null out reference to the dataset.
+classList = null;
+
+gc();
+
+// Test that the classList wrapper persisted the GC and still has the custom property.
+shouldEvaluateTo('d.classList.life', 42);
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698