Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: update WPT abort tests
  • Loading branch information
targos committed Aug 7, 2021
commit 4219e523dd0305749730b7db87e2b76237ba82b8
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Last update:

- common: https://github.com/web-platform-tests/wpt/tree/03c5072aff/common
- console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console
- dom/abort: https://github.com/web-platform-tests/wpt/tree/1728d198c9/dom/abort
- dom/abort: https://github.com/web-platform-tests/wpt/tree/c49cafb491/dom/abort
- encoding: https://github.com/web-platform-tests/wpt/tree/35f70910d3/encoding
- FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI
- hr-time: https://github.com/web-platform-tests/wpt/tree/9910784394/hr-time
Expand Down
12 changes: 12 additions & 0 deletions test/fixtures/wpt/dom/abort/AbortSignal.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test(t => {
const signal = AbortSignal.abort();
assert_true(signal instanceof AbortSignal, "returned object is an AbortSignal");
assert_true(signal.aborted, "returned signal is already aborted");
}, "the AbortSignal.abort() static returns an already aborted signal");

async_test(t => {
const s = AbortSignal.abort();
s.addEventListener("abort", t.unreached_func("abort event listener called"));
s.onabort = t.unreached_func("abort event handler called");
t.step_timeout(() => { t.done(); }, 2000);
}, "signal returned by AbortSignal.abort() should not fire abort event");
5 changes: 0 additions & 5 deletions test/fixtures/wpt/dom/abort/event.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,4 @@ test(t => {
controller.abort();
}, "the abort event should have the right properties");

test(t => {
const signal = AbortSignal.abort();
assert_true(signal.aborted);
}, "the AbortSignal.abort() static returns an already aborted signal");

done();
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"path": "console"
},
"dom/abort": {
"commit": "1728d198c92834d92f7f399ef35e7823d5bfa0e4",
"commit": "c49cafb491d99d6318f8f24a26936cc66501f412",
"path": "dom/abort"
},
"encoding": {
Expand Down