diff options
Diffstat (limited to 'testing/web-platform/tests/xhr/abort-during-unsent.any.js')
-rw-r--r-- | testing/web-platform/tests/xhr/abort-during-unsent.any.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/xhr/abort-during-unsent.any.js b/testing/web-platform/tests/xhr/abort-during-unsent.any.js new file mode 100644 index 0000000000..648ca055ae --- /dev/null +++ b/testing/web-platform/tests/xhr/abort-during-unsent.any.js @@ -0,0 +1,19 @@ +// META: title=XMLHttpRequest: abort() during UNSENT + + var test = async_test() + test.step(function() { + var client = new XMLHttpRequest() + client.onreadystatechange = function() { + test.step(function() { + assert_unreached() + }) + } + assert_equals(client.readyState, 0) + assert_equals(client.status, 0) + assert_equals(client.statusText, "") + client.abort() + assert_equals(client.readyState, 0) + assert_equals(client.status, 0) + assert_equals(client.statusText, "") + }) + test.done() |