summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/XMLHttpRequest/abort-during-open.js
blob: 4ddb84fe8b78dca7fce6c729bf7ee9330e447f5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()