-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add content test for [LenientThis] attribute Document.onreadystatechange
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,28 @@ | |||
<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"); | |||
}); | |||
} | |||
|
|||
finish(); | |||
</script> | |||
</head> | |||
</html> |
9653965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from Ms2ger
at mukilan@9653965
9653965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging mukilan/servo/lenient-this = 9653965 into auto
9653965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mukilan/servo/lenient-this = 9653965 merged ok, testing candidate = 6c86284
9653965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://build.servo.org/builders/mac/builds/458