1
0
Fork 0
firefox/testing/web-platform/tests/xhr/event-loadstart.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

17 lines
518 B
JavaScript

// META: title=XMLHttpRequest: loadstart event
var test = async_test();
test.step(function () {
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);
test.done();
});
test.step_timeout(function () {
assert_unreached("onloadstart not called after 500 ms");
}, 500);
client.open("GET", "resources/well-formed.xml");
client.send(null);
});