mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 16:15:08 +00:00

This verifies that an Invalid State Error is being thrown when XHR.open() has not been called before calling XHR::send().
14 lines
323 B
HTML
14 lines
323 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const INVALID_STATE_ERR = 11;
|
|
try {
|
|
const xhr = new XMLHttpRequest();
|
|
xhr.send();
|
|
}
|
|
catch (e) {
|
|
if (e.code === INVALID_STATE_ERR)
|
|
println("PASS");
|
|
}
|
|
});
|
|
</script>
|