Chromium Code Reviews

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/htmlcollection-reachable.html

Issue 1934183002: Have htmlcollection-reachable.html force the one GC needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync expectations Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/LayoutTests/fast/dom/htmlcollection-reachable.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/htmlcollection-reachable.html b/third_party/WebKit/LayoutTests/fast/dom/htmlcollection-reachable.html
index b91c47cd02d2ff03321c1e9b4f576a6e43ca9540..dd02b0fe7298bd009c0081d82ee21788f137f215 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/htmlcollection-reachable.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/htmlcollection-reachable.html
@@ -40,11 +40,13 @@ var collections = [
'tableRow.cells',
];
-for (var i = 0; i < collections.length; i++) {
- var code = collections[i];
- eval(code).customProperty = i;
- gc();
- shouldBe(code + '.customProperty', '' + i);
-}
+// Note: as document.plugins is [ImplementedAs=embeds],
+// use customProperty{i} to ensure uniqueness.
+for (var i = 0; i < collections.length; ++i)
+ eval(collections[i])['customProperty' + i] = i;
+gc();
+
+for (var i = 0; i < collections.length; ++i)
+ shouldBe(collections[i] + '.customProperty' + i, '' + i);
</script>

Powered by Google App Engine