Skip to content

Commit 7e98845

Browse files
targosdanielleadams
authored andcommitted
test: update WPT abort tests
PR-URL: #39697 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 94381fb commit 7e98845

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

test/fixtures/wpt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Last update:
1212

1313
- common: https://github.com/web-platform-tests/wpt/tree/03c5072aff/common
1414
- console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console
15-
- dom/abort: https://github.com/web-platform-tests/wpt/tree/1728d198c9/dom/abort
15+
- dom/abort: https://github.com/web-platform-tests/wpt/tree/c49cafb491/dom/abort
1616
- encoding: https://github.com/web-platform-tests/wpt/tree/35f70910d3/encoding
1717
- FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI
1818
- hr-time: https://github.com/web-platform-tests/wpt/tree/9910784394/hr-time
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
test(t => {
2+
const signal = AbortSignal.abort();
3+
assert_true(signal instanceof AbortSignal, "returned object is an AbortSignal");
4+
assert_true(signal.aborted, "returned signal is already aborted");
5+
}, "the AbortSignal.abort() static returns an already aborted signal");
6+
7+
async_test(t => {
8+
const s = AbortSignal.abort();
9+
s.addEventListener("abort", t.unreached_func("abort event listener called"));
10+
s.onabort = t.unreached_func("abort event handler called");
11+
t.step_timeout(() => { t.done(); }, 2000);
12+
}, "signal returned by AbortSignal.abort() should not fire abort event");

test/fixtures/wpt/dom/abort/event.any.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,4 @@ test(t => {
6464
controller.abort();
6565
}, "the abort event should have the right properties");
6666

67-
test(t => {
68-
const signal = AbortSignal.abort();
69-
assert_true(signal.aborted);
70-
}, "the AbortSignal.abort() static returns an already aborted signal");
71-
7267
done();

test/fixtures/wpt/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"path": "console"
99
},
1010
"dom/abort": {
11-
"commit": "1728d198c92834d92f7f399ef35e7823d5bfa0e4",
11+
"commit": "c49cafb491d99d6318f8f24a26936cc66501f412",
1212
"path": "dom/abort"
1313
},
1414
"encoding": {

0 commit comments

Comments
 (0)