diff options
Diffstat (limited to 'testing/web-platform/tests/XMLHttpRequest/abort-during-open.js')
-rw-r--r-- | testing/web-platform/tests/XMLHttpRequest/abort-during-open.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/web-platform/tests/XMLHttpRequest/abort-during-open.js b/testing/web-platform/tests/XMLHttpRequest/abort-during-open.js new file mode 100644 index 000000000..4ddb84fe8 --- /dev/null +++ b/testing/web-platform/tests/XMLHttpRequest/abort-during-open.js @@ -0,0 +1,14 @@ +var test = async_test() +test.step(function() { + var client = new XMLHttpRequest() + client.open("GET", "...") + client.onreadystatechange = function() { + test.step(function() { + assert_unreached() + }) + } + client.abort() + assert_equals(client.readyState, 0) + assert_throws("InvalidStateError", function() { client.send("test") }, "calling send() after abort()") +}) +test.done() |