| <title>XMLHttpRequest: loadstart event</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onloadstart" data-tested-assertations="../.." /> |
| <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-loadstart" data-tested-assertations="../.." /> |
| <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following-sibling::ol/li[9]/ol/li[2]" /> |
| var client = new XMLHttpRequest(); |
| client.onloadstart = test.step_func(function(e) { |
| assert_true(e instanceof ProgressEvent); |
| assert_equals(e.type, "loadstart"); |
| assert_equals(client.readyState, 1); |
| setTimeout(test.step_func(function () { |
| assert_unreached("onloadstart not called after 500 ms"); |
| client.open("GET", "resources/well-formed.xml"); |