Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /xml/onreadystatechange-crash-on-stop.xhtml - WPT Dashboard Interop Dashboard
<!--
This needs to be a testharness.js test rather than a crashtest so that we
can explicitly call done().
-->
<head>
<title>Test for crash with stop() in onreadystatechange handler</title>
<script src="/resources/testharness.js" />
<script src="/resources/testharnessreport.js" />
</head>
<body>
<script>
setup({ single_test: true });
document.addEventListener("readystatechange", function () {
window.stop();
// Call done() explicitly because stop() would otherwise lead to a
// timeout (at least in a crashtest), and also explicitly dispatch the
// "load" event to keep WPT happy.
done();
window.dispatchEvent(new Event("load"));
}, { once: true });
</script>
</body>
</html>