Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d

This commit is contained in:
Josh Matthews 2017-06-19 19:07:14 -04:00 committed by Ms2ger
parent 3f07cfec7c
commit 578498ba24
4001 changed files with 159517 additions and 30260 deletions

View file

@ -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>