summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/abort-during-open.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/xhr/abort-during-open.any.js')
-rw-r--r--testing/web-platform/tests/xhr/abort-during-open.any.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/xhr/abort-during-open.any.js b/testing/web-platform/tests/xhr/abort-during-open.any.js
new file mode 100644
index 0000000000..42a1bce0ef
--- /dev/null
+++ b/testing/web-platform/tests/xhr/abort-during-open.any.js
@@ -0,0 +1,18 @@
+var test = async_test("XMLHttpRequest: abort() during OPEN");
+test.step(function() {
+ var client = new XMLHttpRequest()
+ client.open("GET", "...")
+ client.onreadystatechange = function() {
+ test.step(function() {
+ assert_unreached()
+ })
+ }
+ assert_equals(client.readyState, 1, "before abort()")
+ assert_equals(client.status, 0)
+ assert_equals(client.statusText, "")
+ client.abort()
+ assert_equals(client.readyState, 1, "after abort()")
+ assert_equals(client.status, 0)
+ assert_equals(client.statusText, "")
+})
+test.done()