| 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>
|
|
|