blob: 47c6f4c60f5c2a6bf0d890eb51bda883d282907d [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script>
window.addEventListener("beforeunload", (event) => {
xhr = new XMLHttpRequest();
xhr.open("GET", "/resources/dummy.xml", false);
try {
xhr.send(null);
opener.testFailed("Doing a synchronous XHR in the beforeunload event handler did not throw");
} catch (e) {
opener.testPassed("Doing a synchronous XHR in the beforeunload event handler threw an exception");
}
opener.finishJSTest();
});
</script>
</body>
</html>