| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>[LenientThis] test</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script> |
| 6 test(function() { |
| 7 // GlobalEventHandlers.onmouseenter is [LenientThis]. |
| 8 assert_equals(document.onmouseenter, null, "|this| is an appropriate object.
"); |
| 9 assert_equals(Document.prototype.onmouseenter, undefined, "|this| is not an
appropriate object."); |
| 10 Document.prototype.onmouseenter = 'foo'; // must not throw. |
| 11 assert_equals(Document.prototype.onmouseenter, undefined, "the value must no
t change."); |
| 12 |
| 13 // GlobalEventHandlers.onmousedown is NOT [LenientThis]. |
| 14 assert_equals(document.onmousedown, null, "|this| is an appropriate object."
); |
| 15 assert_throws(null, function() { |
| 16 Document.prototype.onmousedown; |
| 17 }, "Document.prototype is invalid as |this|."); |
| 18 assert_throws(null, function() { |
| 19 Document.prototype.onmousedown = 'foo'; |
| 20 }, "Document.prototype is invalid as |this|."); |
| 21 }); |
| 22 </script> |
| OLD | NEW |