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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <body style="margin: 0px"> 5 <body style="margin: 0px">
6 <script> 6 <script>
7 7
8 shouldBeEqualToString("document.body.style.margin", "0px"); 8 shouldBeEqualToString("document.body.style.margin", "0px");
9 shouldBe("document.body.style.margin = 1", "1"); 9 shouldBe("document.body.style.margin = 1", "1");
10 shouldBeEqualToString("document.body.style.margin", "1px"); 10 shouldBeEqualToString("document.body.style.margin", "1px");
11 11
12 shouldBe("document.body.style.__proto__.margin = 777", "777");
13 shouldBe("document.body.style.__proto__.margin", "777");
14
15 shouldBeEqualToString("document.body.style.margin", "1px");
16 shouldBe("document.body.style.margin = 2", "2");
17 shouldBeEqualToString("document.body.style.margin", "2px");
18
19 var badString = { toString: function() { throw "Exception in toString()"; } }; 12 var badString = { toString: function() { throw "Exception in toString()"; } };
20 shouldThrow("document.body.style.margin = badString", "'Exception in toString()' "); 13 shouldThrow("document.body.style.margin = badString", "'Exception in toString()' ");
21 shouldBeEqualToString("document.body.style.margin", "2px"); // Should not reset the previous value. 14 shouldBeEqualToString("document.body.style.margin", "1px"); // Should not reset the previous value.
15
16 // Creating a new property on prototype shadows the named property.
17 shouldBe("document.body.style.__proto__.margin = 2", "2");
18 shouldBe("document.body.style.__proto__.margin", "2");
19 shouldBeEqualToNumber("document.body.style.margin", 2);
20
21 shouldBe("document.body.style.margin = 3", "3");
22 shouldBeEqualToNumber("document.body.style.margin", 3);
22 23
23 </script> 24 </script>
24 </body> 25 </body>
25 </html> 26 </html>
OLDNEW
« 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