-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #39697 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
- Loading branch information
1 parent
94381fb
commit 7e98845
Showing
4 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters