| OLD | NEW |
| 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"); | 12 shouldBe("document.body.style.__proto__.margin = 777", "777"); |
| 13 shouldBe("document.body.style.__proto__.margin", "777"); | 13 shouldBe("document.body.style.__proto__.margin", "777"); |
| 14 | 14 |
| 15 shouldBeEqualToString("document.body.style.margin", "1px"); | 15 shouldBeEqualToString("document.body.style.margin", "1px"); |
| 16 shouldBe("document.body.style.margin = 2", "2"); | 16 shouldBe("document.body.style.margin = 2", "2"); |
| 17 shouldBeEqualToString("document.body.style.margin", "2px"); | 17 shouldBeEqualToString("document.body.style.margin", "2px"); |
| 18 | 18 |
| 19 var badString = { toString: function() { throw "Exception in toString()"; } }; |
| 20 shouldThrow("document.body.style.margin = badString", "'Exception in toString()'
"); |
| 21 shouldBeEqualToString("document.body.style.margin", "2px"); // Should not reset
the previous value. |
| 22 |
| 19 </script> | 23 </script> |
| 20 </body> | 24 </body> |
| 21 </html> | 25 </html> |
| OLD | NEW |