2 <title>[LenientThis] test
</title>
3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
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 not change.");
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|.");