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

Unified Diff: LayoutTests/fast/dom/inline-event-attributes-release.html

Issue 300783002: Make fast/dom/inline-attributes-release.html deterministic by making (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/inline-event-attributes-release.html
diff --git a/LayoutTests/fast/dom/inline-event-attributes-release.html b/LayoutTests/fast/dom/inline-event-attributes-release.html
index 5a5c6e84cb2e89ea72fa41c3ed1abafb993df603..2db4f80d438a7b103eafda2dd8f01e01d1452525 100644
--- a/LayoutTests/fast/dom/inline-event-attributes-release.html
+++ b/LayoutTests/fast/dom/inline-event-attributes-release.html
@@ -4,24 +4,29 @@
description('Tests that we do not hold on to any nodes');
-gc();
+jsTestIsAsync = true;
function numberOfLiveNodes() {
return window.internals && window.internals.numberOfLiveNodes && window.internals.numberOfLiveNodes();
}
-var beforeCount = numberOfLiveNodes();
+var afterCount;
+var beforeCount;
+
+asyncGC(function() {
+ beforeCount = numberOfLiveNodes();
+ var f = document.createElement('form');
+ var i = f.appendChild(document.createElement('input'));
+ i.setAttribute('onclick', '');
+ f.removeChild(i);
+ f = null;
+ i = null;
+ asyncGC(function() {
+ afterCount = numberOfLiveNodes();
+ shouldBe('afterCount - beforeCount', '0');
+ finishJSTest();
+ });
+});
-var f = document.createElement('form');
-var i = f.appendChild(document.createElement('input'));
-i.setAttribute('onclick', '');
-f.removeChild(i);
-f = null;
-i = null;
-gc();
-
-var afterCount = numberOfLiveNodes();
-
-shouldBe('afterCount - beforeCount', '0');
</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698