Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<meta charset="utf-8">
<title>TestDriver click on a document in an iframe</title>
<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>
setup({single_test: true});
addEventListener("message", (msg) => {
if (msg.data === "PASS") {
done();
} else if (msg.data === "FAIL") {
assert_unreached("click failed");
} else {
assert_unreached("testdriver.js-internal messages should not be exposed to tests");
}
});
</script>
<!-- Make sure we add the event listener before loading the iframe, to avoid
potentially missing messages from the child. -->