blob: 82043ac25f4144e7d9304a3fb4c77f5084f13009 [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>
setup({single_test: true});
if (!location.search) {
document.addEventListener('readystatechange', () => {
window.stop();
});
document.querySelector('a').click();
} else {
assert_equals(location.search, "?done");
done();
}
</script>