1
0
Fork 0
firefox/testing/web-platform/tests/xhr/xhr-timeout-longtask.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

14 lines
388 B
JavaScript

async_test(function() {
var client = new XMLHttpRequest();
client.open("GET", "resources/delay.py?ms=100", true);
client.timeout = 150;
client.ontimeout = this.step_func(assert_unreached);
client.onloadend = () => this.done();
client.send();
const start = performance.now();
while (performance.now() - start < 200) { }
}, "Long tasks should not trigger load timeout")