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

Unified Diff: LayoutTests/fast/dom/script-tests/collection-item-should-be-overridden-by-own-property.js

Issue 15690020: [binding] Check own property on named property accessor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 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
Index: LayoutTests/fast/dom/script-tests/collection-item-should-be-overridden-by-own-property.js
diff --git a/LayoutTests/fast/dom/script-tests/collection-item-should-be-overridden-by-own-property.js b/LayoutTests/fast/dom/script-tests/collection-item-should-be-overridden-by-own-property.js
new file mode 100644
index 0000000000000000000000000000000000000000..f9f8e62b0a6474ccad62892b179f418a3326ef6e
--- /dev/null
+++ b/LayoutTests/fast/dom/script-tests/collection-item-should-be-overridden-by-own-property.js
@@ -0,0 +1,22 @@
+description("This test ensures the collection item obtained by named property getter is overridden by object's own property.");
+
+var form = document.all;
+var select = document.querySelector('select');
+var table = document.querySelector('table');
+shouldBe("document.all.foo", "document.getElementById('element0')");
+document.all.foo = 1;
+shouldBe("document.all.foo", "1");
+
+shouldBe("document.styleSheets.link1", "document.styleSheets[0]");
+document.styleSheets.link1 = 1;
+shouldBe("document.styleSheets.link1", "1");
+
+shouldBe("document.body.attributes.style", "document.body.attributes['style']");
+document.body.attributes.style = 1;
+shouldBe("document.body.attributes.style", "1");
+
+
+document.getElementById('testElements').style.display = 'none';
+
+var successfullyParsed = true;
+

Powered by Google App Engine
This is Rietveld 408576698