mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update web-platform-tests to revision 592e2ed83ecd717392d37047536250ba74f1bafa
This commit is contained in:
parent
c8b0dc965d
commit
0a3e19aac8
65 changed files with 1906 additions and 106 deletions
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>HTMLBodyElement event handlers</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<body>
|
||||
<script>
|
||||
function f() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var handlers = ['blur','error','focus','load','resize','scroll',
|
||||
'afterprint','beforeprint','beforeunload','hashchange',
|
||||
'languagechange','message','offline','online','pagehide',
|
||||
'pageshow','popstate','storage','unload'];
|
||||
handlers.forEach(function(handler) {
|
||||
test(function() {
|
||||
window['on' + handler] = f;
|
||||
assert_equals(document.body['on' + handler], f);
|
||||
}, handler);
|
||||
});
|
||||
|
||||
handlers.forEach(function(handler) {
|
||||
window['on' + handler] = null;
|
||||
});
|
||||
|
||||
handlers.forEach(function(handler) {
|
||||
test(function() {
|
||||
assert_equals(window['on' + handler], null);
|
||||
assert_equals(document.body['on' + handler], null);
|
||||
}, handler + " removal");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue