blob: c9cd2f18a1f0ce7c34e6f8acfba7fcd3ad2b0de4 [file] [log] [blame]
<title>
This test ensures that page cannot stop navigation away from itself by calling
window.stop() from onreadystatechange.
</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<a href="?done">click me</a>
<script>
if (!location.search) {
document.addEventListener('readystatechange', () => {
window.stop();
});
document.querySelector('a').click();
} else {
assert_equals(location.search, "?done");
done();
}
</script>