Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / CSSStyleDeclaration / css-style-declaration-named-setter.html
blobd8cba2077884edb2d73cfc2cf7877d837b17d675
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body style="margin: 0px">
6 <script>
8 shouldBeEqualToString("document.body.style.margin", "0px");
9 shouldBe("document.body.style.margin = 1", "1");
10 shouldBeEqualToString("document.body.style.margin", "1px");
12 var badString = { toString: function() { throw "Exception in toString()"; } };
13 shouldThrow("document.body.style.margin = badString", "'Exception in toString()'");
14 shouldBeEqualToString("document.body.style.margin", "1px"); // Should not reset the previous value.
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);
21 shouldBe("document.body.style.margin = 3", "3");
22 shouldBeEqualToNumber("document.body.style.margin", 3);
24 </script>
25 </body>
26 </html>