summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/xhr/event-abort.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/xhr/event-abort.any.js')
-rw-r--r--test/wpt/tests/xhr/event-abort.any.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/wpt/tests/xhr/event-abort.any.js b/test/wpt/tests/xhr/event-abort.any.js
new file mode 100644
index 0000000..5b17ece
--- /dev/null
+++ b/test/wpt/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);
+});