mirror of
https://github.com/servo/servo.git
synced 2025-07-29 10:10:34 +01:00
26 lines
984 B
HTML
26 lines
984 B
HTML
<html>
|
|
<head>
|
|
<script src="harness.js"></script>
|
|
<script>
|
|
var handler = function () { };
|
|
document.onreadystatechange = handler;
|
|
var obj = {};
|
|
|
|
// test1: basic test
|
|
{
|
|
var val = Object.getOwnPropertyDescriptor(Document.prototype, "onreadystatechange").get.call(document);
|
|
is(val, handler, "test1-0, basic test");
|
|
}
|
|
|
|
// test2: Should not throw for attribute marked "[LenientThis]"
|
|
{
|
|
should_not_throw(function () {
|
|
var val = null;
|
|
val = Object.getOwnPropertyDescriptor(Document.prototype, "onreadystatechange").get.call(obj);
|
|
is(val, undefined, "test2-0, calling getter returns undefined");
|
|
is(Document.prototype.onreadystatechange, undefined, "test2-1, property access returns undefined");
|
|
});
|
|
}
|
|
</script>
|
|
</head>
|
|
</html>
|