Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=author href="mailto:japhet@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<div id='d' style='height: 100px; width: 100px'></div>
<script>
const ESC = '\uE00C';
promise_test(async t => {
let watcher = new CloseWatcher();
let onclose_called = false;
watcher.onclose = () => onclose_called = true;
window.onkeydown = e => e.preventDefault();
await test_driver.send_keys(document.getElementById('d'), ESC);
assert_false(onclose_called);
}, "normal event listeners come before CloseWatcher");
</script>