summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/event-abort.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/xhr/event-abort.any.js')
-rw-r--r--testing/web-platform/tests/xhr/event-abort.any.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/xhr/event-abort.any.js b/testing/web-platform/tests/xhr/event-abort.any.js
new file mode 100644
index 0000000000..5b17ece008
--- /dev/null
+++ b/testing/web-platform/tests/xhr/event-abort.any.js
@@ -0,0 +1,15 @@
+// META: title=XMLHttpRequest: abort event
+
+var test = async_test();
+test.step(function () {
+ var client = new XMLHttpRequest();
+ client.onabort = test.step_func(function () {
+ test.done();
+ });
+ client.open("GET", "resources/well-formed.xml");
+ client.send(null);
+ client.abort();
+ test.step_timeout(() => {
+ assert_unreached("onabort not called after 4 ms");
+ }, 4);
+});