script: stub AbortSignal (#37033)

This is a stub for `AbortSignal`, which we would like to merge first in
order to work in parallel on
https://github.com/servo/servo/issues/34866, and perhaps also
https://github.com/servo/servo/issues/36936

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
Gregory Terzian 2025-05-27 17:53:43 +08:00 committed by GitHub
parent 270dcf879d
commit 324196351e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 330 additions and 0 deletions

View file

@ -1,5 +1,10 @@
[abort-signal-any.any.worker.html]
expected: ERROR
[AbortSignal.any() works with an empty array of signals]
expected: FAIL
[abort-signal-any.any.html]
expected: ERROR
[AbortSignal.any() works with an empty array of signals]
expected: FAIL

View file

@ -6,6 +6,105 @@
[abort.any.html]
expected: ERROR
[a signal argument 'null' should cause pipeTo() to reject]
expected: FAIL
[a signal argument 'AbortSignal' should cause pipeTo() to reject]
expected: FAIL
[a signal argument 'true' should cause pipeTo() to reject]
expected: FAIL
[a signal argument '-1' should cause pipeTo() to reject]
expected: FAIL
[a signal argument '[object AbortSignal\]' should cause pipeTo() to reject]
expected: FAIL
[an aborted signal should cause the writable stream to reject with an AbortError]
expected: FAIL
[(reason: 'null') all the error objects should be the same object]
expected: FAIL
[(reason: 'undefined') all the error objects should be the same object]
expected: FAIL
[(reason: 'error1: error1') all the error objects should be the same object]
expected: FAIL
[preventCancel should prevent canceling the readable]
expected: FAIL
[preventAbort should prevent aborting the readable]
expected: FAIL
[preventCancel and preventAbort should prevent canceling the readable and aborting the readable]
expected: FAIL
[(reason: 'null') abort should prevent further reads]
expected: FAIL
[(reason: 'undefined') abort should prevent further reads]
expected: FAIL
[(reason: 'error1: error1') abort should prevent further reads]
expected: FAIL
[(reason: 'null') all pending writes should complete on abort]
expected: FAIL
[(reason: 'undefined') all pending writes should complete on abort]
expected: FAIL
[(reason: 'error1: error1') all pending writes should complete on abort]
expected: FAIL
[(reason: 'null') underlyingSource.cancel() should called when abort, even with pending pull]
expected: FAIL
[(reason: 'undefined') underlyingSource.cancel() should called when abort, even with pending pull]
expected: FAIL
[(reason: 'error1: error1') underlyingSource.cancel() should called when abort, even with pending pull]
expected: FAIL
[a rejection from underlyingSource.cancel() should be returned by pipeTo()]
expected: FAIL
[a rejection from underlyingSink.abort() should be returned by pipeTo()]
expected: FAIL
[a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel()]
expected: FAIL
[abort signal takes priority over closed readable]
expected: FAIL
[abort signal takes priority over errored readable]
expected: FAIL
[abort signal takes priority over closed writable]
expected: FAIL
[abort signal takes priority over errored writable]
expected: FAIL
[abort should do nothing after the readable is closed]
expected: FAIL
[abort should do nothing after the readable is errored]
expected: FAIL
[abort should do nothing after the readable is errored, even with pending writes]
expected: FAIL
[abort should do nothing after the writable is errored]
expected: FAIL
[pipeTo on a teed readable byte stream should only be aborted when both branches are aborted]
expected: FAIL
[abort.any.shadowrealm-in-dedicatedworker.html]
expected: ERROR
@ -21,6 +120,105 @@
[abort.any.worker.html]
expected: ERROR
[a signal argument 'null' should cause pipeTo() to reject]
expected: FAIL
[a signal argument 'AbortSignal' should cause pipeTo() to reject]
expected: FAIL
[a signal argument 'true' should cause pipeTo() to reject]
expected: FAIL
[a signal argument '-1' should cause pipeTo() to reject]
expected: FAIL
[a signal argument '[object AbortSignal\]' should cause pipeTo() to reject]
expected: FAIL
[an aborted signal should cause the writable stream to reject with an AbortError]
expected: FAIL
[(reason: 'null') all the error objects should be the same object]
expected: FAIL
[(reason: 'undefined') all the error objects should be the same object]
expected: FAIL
[(reason: 'error1: error1') all the error objects should be the same object]
expected: FAIL
[preventCancel should prevent canceling the readable]
expected: FAIL
[preventAbort should prevent aborting the readable]
expected: FAIL
[preventCancel and preventAbort should prevent canceling the readable and aborting the readable]
expected: FAIL
[(reason: 'null') abort should prevent further reads]
expected: FAIL
[(reason: 'undefined') abort should prevent further reads]
expected: FAIL
[(reason: 'error1: error1') abort should prevent further reads]
expected: FAIL
[(reason: 'null') all pending writes should complete on abort]
expected: FAIL
[(reason: 'undefined') all pending writes should complete on abort]
expected: FAIL
[(reason: 'error1: error1') all pending writes should complete on abort]
expected: FAIL
[(reason: 'null') underlyingSource.cancel() should called when abort, even with pending pull]
expected: FAIL
[(reason: 'undefined') underlyingSource.cancel() should called when abort, even with pending pull]
expected: FAIL
[(reason: 'error1: error1') underlyingSource.cancel() should called when abort, even with pending pull]
expected: FAIL
[a rejection from underlyingSource.cancel() should be returned by pipeTo()]
expected: FAIL
[a rejection from underlyingSink.abort() should be returned by pipeTo()]
expected: FAIL
[a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel()]
expected: FAIL
[abort signal takes priority over closed readable]
expected: FAIL
[abort signal takes priority over errored readable]
expected: FAIL
[abort signal takes priority over closed writable]
expected: FAIL
[abort signal takes priority over errored writable]
expected: FAIL
[abort should do nothing after the readable is closed]
expected: FAIL
[abort should do nothing after the readable is errored]
expected: FAIL
[abort should do nothing after the readable is errored, even with pending writes]
expected: FAIL
[abort should do nothing after the writable is errored]
expected: FAIL
[pipeTo on a teed readable byte stream should only be aborted when both branches are aborted]
expected: FAIL
[abort.https.any.shadowrealm-in-audioworklet.html]
expected: ERROR

View file

@ -6,6 +6,27 @@
[pipe-through.any.worker.html]
expected: ERROR
[pipeThrough should accept a real AbortSignal]
expected: FAIL
[invalid values of signal should throw; specifically 'null']
expected: FAIL
[invalid values of signal should throw; specifically '0']
expected: FAIL
[invalid values of signal should throw; specifically 'NaN']
expected: FAIL
[invalid values of signal should throw; specifically 'true']
expected: FAIL
[invalid values of signal should throw; specifically 'AbortSignal']
expected: FAIL
[invalid values of signal should throw; specifically '[object AbortSignal\]']
expected: FAIL
[pipe-through.any.sharedworker.html]
expected: ERROR
@ -27,3 +48,23 @@
[pipe-through.any.html]
expected: ERROR
[pipeThrough should accept a real AbortSignal]
expected: FAIL
[invalid values of signal should throw; specifically 'null']
expected: FAIL
[invalid values of signal should throw; specifically '0']
expected: FAIL
[invalid values of signal should throw; specifically 'NaN']
expected: FAIL
[invalid values of signal should throw; specifically 'true']
expected: FAIL
[invalid values of signal should throw; specifically 'AbortSignal']
expected: FAIL
[invalid values of signal should throw; specifically '[object AbortSignal\]']
expected: FAIL