Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port skipped "test_body_event_handler_inline" to WPT
Co-Authored-By: Timothy Gu <timothygu99@gmail.com>
- Loading branch information
Showing
2 changed files
with
28 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test/web-platform-tests/to-upstream/jsdom/misc/test_body_event_handler_inline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Test inline event handlers set on the body.</title> | ||
<link rel="author" title="Timothy Gu" href="mailto:timothygu99@gmail.com"> | ||
<link rel="help" href="https://github.com/jsdom/jsdom/issues/1379"> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
|
||
<script> | ||
"use strict"; | ||
setup({ single_test: true }); | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
function onloadHandler() { | ||
window.loader_called = true; | ||
} | ||
</script> | ||
|
||
<body onload="onloadHandler()"> | ||
<div id=log></div> | ||
<script> | ||
"use strict"; | ||
window.addEventListener("load", () => { | ||
assert_true(window.loader_called); | ||
done(); | ||
}); | ||
</script> | ||
</body> |