mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
|
@ -1,8 +1,11 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<title>instanceof behavior</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<iframe></iframe>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
var obj = Object.create(Element.prototype);
|
||||
|
@ -10,4 +13,14 @@ test(function() {
|
|||
assert_true(obj instanceof Node);
|
||||
assert_false(obj instanceof Attr);
|
||||
}, "Manually-constructed prototype chains are correctly handled by instanceof");
|
||||
|
||||
test(() => {
|
||||
// This tests that the historical override of [[HasInstance]] was removed:
|
||||
// https://github.com/heycam/webidl/pull/356
|
||||
assert_false(document.body instanceof frames[0].Element);
|
||||
}, "instanceof must return false across different globals, for platform objects");
|
||||
|
||||
test(() => {
|
||||
assert_false(EventTarget.hasOwnProperty(Symbol.hasInstance));
|
||||
}, "platform objects do not have Symbol.hasInstance installed");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue