mirror of
https://github.com/servo/servo.git
synced 2025-09-19 03:18:20 +01:00
Script: Implement TextEncoderStream
(#38466)
This implements the `TextEncoderStream` WebIDL interface. Testing: Existing WPT tests should be sufficient Fixes: #37724 --------- Signed-off-by: minghuaw <wuminghua7@huawei.com>
This commit is contained in:
parent
f24f225db8
commit
d409137e4c
17 changed files with 476 additions and 228 deletions
|
@ -1,10 +1,4 @@
|
|||
[backpressure.any.worker.html]
|
||||
[write() should not complete until read relieves backpressure for TextEncoderStream]
|
||||
expected: FAIL
|
||||
|
||||
[additional writes should wait for backpressure to be relieved for class TextEncoderStream]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[backpressure.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
@ -13,12 +7,6 @@
|
|||
expected: ERROR
|
||||
|
||||
[backpressure.any.html]
|
||||
[write() should not complete until read relieves backpressure for TextEncoderStream]
|
||||
expected: FAIL
|
||||
|
||||
[additional writes should wait for backpressure to be relieved for class TextEncoderStream]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[backpressure.any.shadowrealm.html]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,22 +1,4 @@
|
|||
[encode-bad-chunks.any.html]
|
||||
[a chunk that cannot be converted to a string should error the streams]
|
||||
expected: FAIL
|
||||
|
||||
[input of type undefined should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type null should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type numeric should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type object should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type array should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[encode-bad-chunks.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
@ -25,20 +7,3 @@
|
|||
expected: ERROR
|
||||
|
||||
[encode-bad-chunks.any.worker.html]
|
||||
[a chunk that cannot be converted to a string should error the streams]
|
||||
expected: FAIL
|
||||
|
||||
[input of type undefined should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type null should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type numeric should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type object should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
||||
[input of type array should be converted correctly to string]
|
||||
expected: FAIL
|
||||
|
|
|
@ -2,121 +2,8 @@
|
|||
expected: ERROR
|
||||
|
||||
[encode-utf8.any.html]
|
||||
[encoding one string of UTF-8 should give one complete chunk]
|
||||
expected: FAIL
|
||||
|
||||
[a character split between chunks should be correctly encoded]
|
||||
expected: FAIL
|
||||
|
||||
[a character following one split between chunks should be correctly encoded]
|
||||
expected: FAIL
|
||||
|
||||
[two consecutive astral characters each split down the middle should be correctly reassembled]
|
||||
expected: FAIL
|
||||
|
||||
[two consecutive astral characters each split down the middle with an invalid surrogate in the middle should be correctly encoded]
|
||||
expected: FAIL
|
||||
|
||||
[a stream ending in a leading surrogate should emit a replacement character as a final chunk]
|
||||
expected: FAIL
|
||||
|
||||
[an unmatched surrogate at the end of a chunk followed by an astral character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[an unmatched surrogate at the end of a chunk followed by an ascii character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[an unmatched surrogate at the end of a chunk followed by a plane 1 character split into two chunks should result in the encoded plane 1 character appearing in the last output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[two leading chunks should result in two replacement characters]
|
||||
expected: FAIL
|
||||
|
||||
[a non-terminal unpaired leading surrogate should immediately be replaced]
|
||||
expected: FAIL
|
||||
|
||||
[a terminal unpaired trailing surrogate should immediately be replaced]
|
||||
expected: FAIL
|
||||
|
||||
[a leading surrogate chunk should be carried past empty chunks]
|
||||
expected: FAIL
|
||||
|
||||
[a leading surrogate chunk should error when it is clear it didn't form a pair]
|
||||
expected: FAIL
|
||||
|
||||
[an empty string should result in no output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[a leading empty chunk should be ignored]
|
||||
expected: FAIL
|
||||
|
||||
[a trailing empty chunk should be ignored]
|
||||
expected: FAIL
|
||||
|
||||
[a plain ASCII chunk should be converted]
|
||||
expected: FAIL
|
||||
|
||||
[characters in the ISO-8859-1 range should be encoded correctly]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[encode-utf8.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
||||
[encode-utf8.any.worker.html]
|
||||
[encoding one string of UTF-8 should give one complete chunk]
|
||||
expected: FAIL
|
||||
|
||||
[a character split between chunks should be correctly encoded]
|
||||
expected: FAIL
|
||||
|
||||
[a character following one split between chunks should be correctly encoded]
|
||||
expected: FAIL
|
||||
|
||||
[two consecutive astral characters each split down the middle should be correctly reassembled]
|
||||
expected: FAIL
|
||||
|
||||
[two consecutive astral characters each split down the middle with an invalid surrogate in the middle should be correctly encoded]
|
||||
expected: FAIL
|
||||
|
||||
[a stream ending in a leading surrogate should emit a replacement character as a final chunk]
|
||||
expected: FAIL
|
||||
|
||||
[an unmatched surrogate at the end of a chunk followed by an astral character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[an unmatched surrogate at the end of a chunk followed by an ascii character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[an unmatched surrogate at the end of a chunk followed by a plane 1 character split into two chunks should result in the encoded plane 1 character appearing in the last output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[two leading chunks should result in two replacement characters]
|
||||
expected: FAIL
|
||||
|
||||
[a non-terminal unpaired leading surrogate should immediately be replaced]
|
||||
expected: FAIL
|
||||
|
||||
[a terminal unpaired trailing surrogate should immediately be replaced]
|
||||
expected: FAIL
|
||||
|
||||
[a leading surrogate chunk should be carried past empty chunks]
|
||||
expected: FAIL
|
||||
|
||||
[a leading surrogate chunk should error when it is clear it didn't form a pair]
|
||||
expected: FAIL
|
||||
|
||||
[an empty string should result in no output chunk]
|
||||
expected: FAIL
|
||||
|
||||
[a leading empty chunk should be ignored]
|
||||
expected: FAIL
|
||||
|
||||
[a trailing empty chunk should be ignored]
|
||||
expected: FAIL
|
||||
|
||||
[a plain ASCII chunk should be converted]
|
||||
expected: FAIL
|
||||
|
||||
[characters in the ISO-8859-1 range should be encoded correctly]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[invalid-realm.window.html]
|
||||
[TextEncoderStream: write in detached realm should succeed]
|
||||
expected: FAIL
|
||||
|
||||
[TextEncoderStream: close in detached realm should succeed]
|
||||
expected: FAIL
|
|
@ -1,7 +1,4 @@
|
|||
[readable-writable-properties.any.html]
|
||||
[TextEncoderStream readable and writable properties must pass brand checks]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[readable-writable-properties.any.sharedworker.html]
|
||||
expected: ERROR
|
||||
|
@ -10,9 +7,6 @@
|
|||
expected: ERROR
|
||||
|
||||
[readable-writable-properties.any.worker.html]
|
||||
[TextEncoderStream readable and writable properties must pass brand checks]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[readable-writable-properties.any.shadowrealm.html]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
[realms.window.html]
|
||||
[a TextEncoderStream object should be associated with the realm the constructor came from]
|
||||
expected: FAIL
|
||||
|
||||
[TextEncoderStream's readable and writable attributes should come from the same realm as the constructor definition]
|
||||
expected: FAIL
|
||||
|
||||
[the output chunks when read is called after write should come from the same realm as the constructor of TextEncoderStream]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[stringification-crash.html]
|
||||
expected: TIMEOUT
|
Loading…
Add table
Add a link
Reference in a new issue