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