summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/abort-during-open.any.js
blob: 42a1bce0ef2cbc4578d15fde846010af2092cbdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()