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

Unified Diff: LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter.html

Issue 1061243002: bindings: Adds check for attributes on prototype chains in CSSStyleDeclaration. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added [OverrideBuiltins] to HTML{Applet,Embed}Element in addition to HTMLObejctElement. Created 5 years, 8 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 | LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter.html
diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter.html b/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter.html
index a7186cc38b3edd16e1c72b757c9fe5ae3927efda..d8cba2077884edb2d73cfc2cf7877d837b17d675 100644
--- a/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter.html
+++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter.html
@@ -9,16 +9,17 @@ shouldBeEqualToString("document.body.style.margin", "0px");
shouldBe("document.body.style.margin = 1", "1");
shouldBeEqualToString("document.body.style.margin", "1px");
-shouldBe("document.body.style.__proto__.margin = 777", "777");
-shouldBe("document.body.style.__proto__.margin", "777");
-
-shouldBeEqualToString("document.body.style.margin", "1px");
-shouldBe("document.body.style.margin = 2", "2");
-shouldBeEqualToString("document.body.style.margin", "2px");
-
var badString = { toString: function() { throw "Exception in toString()"; } };
shouldThrow("document.body.style.margin = badString", "'Exception in toString()'");
-shouldBeEqualToString("document.body.style.margin", "2px"); // Should not reset the previous value.
+shouldBeEqualToString("document.body.style.margin", "1px"); // Should not reset the previous value.
+
+// Creating a new property on prototype shadows the named property.
+shouldBe("document.body.style.__proto__.margin = 2", "2");
+shouldBe("document.body.style.__proto__.margin", "2");
+shouldBeEqualToNumber("document.body.style.margin", 2);
+
+shouldBe("document.body.style.margin = 3", "3");
+shouldBeEqualToNumber("document.body.style.margin", 3);
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/CSSStyleDeclaration/css-style-declaration-named-setter-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698