Update web-platform-tests to revision 1cee79240e1a6e2df18faa0ed27c7febada1e3fb

This commit is contained in:
WPT Sync Bot 2019-11-26 08:30:07 +00:00
parent 74bf0ce5c2
commit e77be0ce0f
90 changed files with 1854 additions and 260 deletions

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>"handleEvent" property of EventHandler should be ignored</title>
<link rel="help" href="https://html.spec.whatwg.org/#eventhandler">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
"use strict";
test(t => {
const handler = Object.create(null, {
handleEvent: {
get: t.unreached_func('"handleEvent" property should not be looked up'),
},
});
const el = document.createElement("div");
el.onmouseenter = handler;
el.dispatchEvent(new MouseEvent("mouseenter"));
}, 'plain object "mouseenter" handler');
async_test(t => {
const handler = Object.create(Function.prototype, {
handleEvent: {
get: t.unreached_func('"handleEvent" property should not be looked up'),
},
});
assert_true(handler instanceof Function);
window.onmessage = handler;
window.postMessage({}, "*");
step_timeout(() => {
t.done();
}, 50);
}, 'non-callable "message" handler that is instance of Function');
</script>

View file

@ -6,7 +6,7 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var t = async_test("body.onresize should set the window.onload handler")
var t = async_test("body.onresize should set the window.onresize handler")
window.onresize = t.step_func(function() {
assert_unreached("This handler should be overwritten.")
})