mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 1cee79240e1a6e2df18faa0ed27c7febada1e3fb
This commit is contained in:
parent
74bf0ce5c2
commit
e77be0ce0f
90 changed files with 1854 additions and 260 deletions
|
@ -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>
|
|
@ -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.")
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue