3 <title>[LenientThis]
</title>
4 <script src=/resources/testharness.js
></script>
5 <script src=/resources/testharnessreport.js
></script>
8 /* global test, assert_equals */
13 var desc
= Object
.getOwnPropertyDescriptor(Document
.prototype, "onreadystatechange");
15 document
.onreadystatechange
= noop1
;
16 assert_equals(document
.onreadystatechange
, noop1
, "document.onreadystatechange == noop1");
17 assert_equals(desc
.get.call({ }), undefined, "document.onreadystatechange getter.call({}) == undefined");
18 }, "invoking Document.onreadystatechange's getter with an invalid this object returns undefined");
21 var desc
= Object
.getOwnPropertyDescriptor(Document
.prototype, "onreadystatechange");
23 document
.onreadystatechange
= noop1
;
24 assert_equals(document
.onreadystatechange
, noop1
, "document.onreadystatechange == noop1");
25 assert_equals(desc
.set.call({ }, noop2
), undefined, "document.onreadystatechange setter.call({}) == undefined");
26 assert_equals(document
.onreadystatechange
, noop1
, "document.onreadystatechange == noop1 (still)");
27 }, "invoking Document.onreadystatechange's setter with an invalid this object does nothing and returns undefined");