Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-12 16:36:34 UTC (rev 275824)
@@ -1,3 +1,39 @@
+2021-04-12 Youenn Fablet <[email protected]>
+
+ Update WPT streams test to ToT
+ https://bugs.webkit.org/show_bug.cgi?id=224284
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/streams/README.md:
+ * web-platform-tests/streams/piping/general.any-expected.txt:
+ * web-platform-tests/streams/piping/general.any.js:
+ (promise_test.t.const.rs.new.ReadableStream.start):
+ * web-platform-tests/streams/piping/general.any.worker-expected.txt:
+ * web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any-expected.txt:
+ * web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.js:
+ * web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.worker-expected.txt:
+ * web-platform-tests/streams/readable-byte-streams/general.any-expected.txt:
+ * web-platform-tests/streams/readable-byte-streams/general.any.js:
+ (test):
+ * web-platform-tests/streams/readable-byte-streams/general.any.worker-expected.txt:
+ * web-platform-tests/streams/readable-streams/async-iterator.any-expected.txt:
+ * web-platform-tests/streams/readable-streams/async-iterator.any.js:
+ (promise_test.async const):
+ (promise_test):
+ * web-platform-tests/streams/readable-streams/async-iterator.any.worker-expected.txt:
+ * web-platform-tests/streams/readable-streams/default-reader.any-expected.txt:
+ * web-platform-tests/streams/readable-streams/default-reader.any.js:
+ (promise_test.t.const.rs.new.ReadableStream.start):
+ * web-platform-tests/streams/readable-streams/default-reader.any.worker-expected.txt:
+ * web-platform-tests/streams/readable-streams/general.any-expected.txt:
+ * web-platform-tests/streams/readable-streams/general.any.js:
+ (promise_test):
+ * web-platform-tests/streams/readable-streams/general.any.worker-expected.txt:
+ * web-platform-tests/streams/transform-streams/patched-global.any-expected.txt:
+ * web-platform-tests/streams/transform-streams/patched-global.any.js:
+ * web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt:
+
2021-04-11 Sam Weinig <[email protected]>
Reduce compile time and binary size cost of enabling proper CSSStyleDeclaration property access behavior
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/README.md (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/README.md 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/README.md 2021-04-12 16:36:34 UTC (rev 275824)
@@ -1,3 +1,3 @@
# Streams Tests
-The work on the streams tests is closely tracked by the specification authors, who maintain a reference implementation intended to match the spec line-by-line while passing all of these tests. See [the whatwg/streams repository for details](https://github.com/whatwg/streams/tree/master/reference-implementation). Some tests may be in that repository while the spec sections they test are still undergoing heavy churn.
+The work on the streams tests is closely tracked by the specification authors, who maintain a reference implementation intended to match the spec line-by-line while passing all of these tests. See [the whatwg/streams repository for details](https://github.com/whatwg/streams/tree/main/reference-implementation). Some tests may be in that repository while the spec sections they test are still undergoing heavy churn.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -12,4 +12,5 @@
PASS an undefined rejection from write should cause pipeTo() to reject when preventCancel is true
PASS an undefined rejection from write should cause pipeTo() to reject when preventCancel is false
PASS pipeTo() should reject if an option getter grabs a writer
+FAIL pipeTo() promise should resolve if null is passed null is not an Object.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -198,3 +198,14 @@
}
}), 'pipeTo should reject');
}, 'pipeTo() should reject if an option getter grabs a writer');
+
+promise_test(t => {
+ const rs = new ReadableStream({
+ start(controller) {
+ controller.close();
+ }
+ });
+ const ws = new WritableStream();
+
+ return rs.pipeTo(ws, null);
+}, 'pipeTo() promise should resolve if null is passed');
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -12,4 +12,5 @@
PASS an undefined rejection from write should cause pipeTo() to reject when preventCancel is true
PASS an undefined rejection from write should cause pipeTo() to reject when preventCancel is false
PASS pipeTo() should reject if an option getter grabs a writer
+FAIL pipeTo() promise should resolve if null is passed null is not an Object.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -18,9 +18,7 @@
FAIL ReadableStream with byte source: respondWithNewView() throws if the supplied view is zero-length on a non-zero-length buffer (in the readable state) assert_throws_js: function "() => c.byobRequest.respondWithNewView(view)" threw object "RangeError: Invalid value for view.byteLength" ("RangeError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
-FAIL ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has been detached (in the closed state) assert_throws_js: function "() => c.byobRequest.respondWithNewView(zeroLengthView)" threw object "RangeError: Invalid value for view.byteLength" ("RangeError") expected instance of function "function TypeError() {
- [native code]
-}" ("TypeError")
+PASS ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has been detached (in the closed state)
FAIL ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer is zero-length (in the closed state) assert_throws_js: function "() => c.byobRequest.respondWithNewView(view)" threw object "RangeError: Invalid value for view.byteLength" ("RangeError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -212,8 +212,7 @@
c.close();
- const zeroLengthView = new Uint8Array(view.buffer, 0, 0);
- assert_throws_js(TypeError, () => c.byobRequest.respondWithNewView(zeroLengthView));
+ assert_throws_js(TypeError, () => c.byobRequest.respondWithNewView(view));
}),
type: 'bytes'
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/bad-buffers-and-views.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -18,9 +18,7 @@
FAIL ReadableStream with byte source: respondWithNewView() throws if the supplied view is zero-length on a non-zero-length buffer (in the readable state) assert_throws_js: function "() => c.byobRequest.respondWithNewView(view)" threw object "RangeError: Invalid value for view.byteLength" ("RangeError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
-FAIL ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has been detached (in the closed state) assert_throws_js: function "() => c.byobRequest.respondWithNewView(zeroLengthView)" threw object "RangeError: Invalid value for view.byteLength" ("RangeError") expected instance of function "function TypeError() {
- [native code]
-}" ("TypeError")
+PASS ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has been detached (in the closed state)
FAIL ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer is zero-length (in the closed state) assert_throws_js: function "() => c.byobRequest.respondWithNewView(view)" threw object "RangeError: Invalid value for view.byteLength" ("RangeError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -6,6 +6,7 @@
PASS getReader({mode}) must perform ToString()
PASS ReadableStream with byte source: Construct and expect start and pull being called
PASS ReadableStream with byte source: No automatic pull call if start doesn't finish
+PASS ReadableStream with byte source: start() throws an exception
PASS ReadableStream with byte source: Construct with highWaterMark of 0
PASS ReadableStream with byte source: desiredSize when closed
PASS ReadableStream with byte source: desiredSize when errored
@@ -15,7 +16,7 @@
PASS ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically
PASS ReadableStream with byte source: Test that erroring a stream does not release a reader automatically
PASS ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically
-PASS ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw
+PASS ReadableStream with byte source: releaseLock() on ReadableStreamDefaultReader with pending read() must throw
PASS ReadableStream with byte source: Automatic pull() after start()
PASS ReadableStream with byte source: Automatic pull() after start() and read()
FAIL ReadableStream with byte source: autoAllocateChunkSize assert_equals: pull() must have been invoked twice expected 2 but got 1
@@ -75,6 +76,9 @@
NOTRUN calling respond(0) twice on the same byobRequest should throw even when closed
NOTRUN pull() resolving should not make releaseLock() possible
NOTRUN ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction
+FAIL ReadableStream with byte source: autoAllocateChunkSize cannot be 0 assert_throws_js: controller cannot be setup with autoAllocateChunkSize = 0 function "() => new ReadableStream({ autoAllocateChunkSize: 0, type: 'bytes' })" threw object "RangeError: autoAllocateChunkSize value is negative or equal to positive or negative infinity" ("RangeError") expected instance of function "function TypeError() {
+ [native code]
+}" ("TypeError")
PASS ReadableStreamBYOBReader can be constructed directly
PASS ReadableStreamBYOBReader constructor requires a ReadableStream argument
PASS ReadableStreamBYOBReader constructor requires an unlocked ReadableStream
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -108,6 +108,11 @@
}, 'ReadableStream with byte source: No automatic pull call if start doesn\'t finish');
+test(() => {
+ assert_throws_js(Error, () => new ReadableStream({ start() { throw new Error(); }, type:'bytes' }),
+ 'start() can throw an exception with type: bytes');
+}, 'ReadableStream with byte source: start() throws an exception');
+
promise_test(t => {
new ReadableStream({
pull: t.unreached_func('pull() should not be called'),
@@ -239,7 +244,7 @@
const reader = stream.getReader();
reader.read();
assert_throws_js(TypeError, () => reader.releaseLock(), 'reader.releaseLock() must throw');
-}, 'ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw');
+}, 'ReadableStream with byte source: releaseLock() on ReadableStreamDefaultReader with pending read() must throw');
promise_test(() => {
let pullCount = 0;
@@ -2056,6 +2061,11 @@
}, 'ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction');
test(() => {
+ assert_throws_js(TypeError, () => new ReadableStream({ autoAllocateChunkSize: 0, type: 'bytes' }),
+ 'controller cannot be setup with autoAllocateChunkSize = 0');
+}, 'ReadableStream with byte source: autoAllocateChunkSize cannot be 0');
+
+test(() => {
const ReadableStreamBYOBReader = new ReadableStream({ type: 'bytes' }).getReader({ mode: 'byob' }).constructor;
const stream = new ReadableStream({ type: 'bytes' });
new ReadableStreamBYOBReader(stream);
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -6,6 +6,7 @@
PASS getReader({mode}) must perform ToString()
PASS ReadableStream with byte source: Construct and expect start and pull being called
PASS ReadableStream with byte source: No automatic pull call if start doesn't finish
+PASS ReadableStream with byte source: start() throws an exception
PASS ReadableStream with byte source: Construct with highWaterMark of 0
PASS ReadableStream with byte source: desiredSize when closed
PASS ReadableStream with byte source: desiredSize when errored
@@ -15,7 +16,7 @@
PASS ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically
PASS ReadableStream with byte source: Test that erroring a stream does not release a reader automatically
PASS ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically
-PASS ReadableStream with byte source: releaseLock() on ReadableStreamReader with pending read() must throw
+PASS ReadableStream with byte source: releaseLock() on ReadableStreamDefaultReader with pending read() must throw
PASS ReadableStream with byte source: Automatic pull() after start()
PASS ReadableStream with byte source: Automatic pull() after start() and read()
FAIL ReadableStream with byte source: autoAllocateChunkSize assert_equals: pull() must have been invoked twice expected 2 but got 1
@@ -75,6 +76,9 @@
NOTRUN calling respond(0) twice on the same byobRequest should throw even when closed
NOTRUN pull() resolving should not make releaseLock() possible
NOTRUN ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction
+FAIL ReadableStream with byte source: autoAllocateChunkSize cannot be 0 assert_throws_js: controller cannot be setup with autoAllocateChunkSize = 0 function "() => new ReadableStream({ autoAllocateChunkSize: 0, type: 'bytes' })" threw object "RangeError: autoAllocateChunkSize value is negative or equal to positive or negative infinity" ("RangeError") expected instance of function "function TypeError() {
+ [native code]
+}" ("TypeError")
PASS ReadableStreamBYOBReader can be constructed directly
PASS ReadableStreamBYOBReader constructor requires a ReadableStream argument
PASS ReadableStreamBYOBReader constructor requires an unlocked ReadableStream
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -37,4 +37,5 @@
FAIL Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true promise_test: Unhandled rejection with value: object "TypeError: s.values is not a function. (In 's.values({preventCancel: true})', 's.values' is undefined)"
FAIL return() should unlock the stream synchronously when preventCancel = false rs.values is not a function. (In 'rs.values({ preventCancel })', 'rs.values' is undefined)
FAIL return() should unlock the stream synchronously when preventCancel = true rs.values is not a function. (In 'rs.values({ preventCancel })', 'rs.values' is undefined)
+FAIL close() while next() is pending promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...chunk of rs...')"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -625,3 +625,26 @@
rs.getReader();
}, `return() should unlock the stream synchronously when preventCancel = ${preventCancel}`);
}
+
+promise_test(async () => {
+ const rs = new ReadableStream({
+ async start(c) {
+ c.enqueue('a');
+ c.enqueue('b');
+ c.enqueue('c');
+ await flushAsyncEvents();
+ // At this point, the async iterator has a read request in the stream's queue for its pending next() promise.
+ // Closing the stream now causes two things to happen *synchronously*:
+ // 1. ReadableStreamClose resolves reader.[[closedPromise]] with undefined.
+ // 2. ReadableStreamClose calls the read request's close steps, which calls ReadableStreamReaderGenericRelease,
+ // which replaces reader.[[closedPromise]] with a rejected promise.
+ c.close();
+ }
+ });
+
+ const chunks = [];
+ for await (const chunk of rs) {
+ chunks.push(chunk);
+ }
+ assert_array_equals(chunks, ['a', 'b', 'c']);
+}, 'close() while next() is pending');
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/async-iterator.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -37,4 +37,5 @@
FAIL Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true promise_test: Unhandled rejection with value: object "TypeError: s.values is not a function. (In 's.values({preventCancel: true})', 's.values' is undefined)"
FAIL return() should unlock the stream synchronously when preventCancel = false rs.values is not a function. (In 'rs.values({ preventCancel })', 'rs.values' is undefined)
FAIL return() should unlock the stream synchronously when preventCancel = true rs.values is not a function. (In 'rs.values({ preventCancel })', 'rs.values' is undefined)
+FAIL close() while next() is pending promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...chunk of rs...')"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -15,6 +15,8 @@
PASS cancel() on a reader does not release the reader
PASS closed should be fulfilled after stream is closed (.closed access before acquiring)
PASS closed should be rejected after reader releases its lock (multiple stream locks)
+PASS closed is replaced when stream closes and reader releases its lock
+PASS closed is replaced when stream errors and reader releases its lock
PASS Multiple readers can access the stream in sequence
PASS Cannot use an already-released reader to unlock a stream again
PASS cancel() on a released reader is a no-op and does not pass through
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -154,6 +154,57 @@
}, 'closed should be rejected after reader releases its lock (multiple stream locks)');
+promise_test(t => {
+
+ let controller;
+ const rs = new ReadableStream({
+ start(c) {
+ controller = c;
+ }
+ });
+
+ const reader = rs.getReader();
+ const promise1 = reader.closed;
+
+ controller.close();
+
+ reader.releaseLock();
+ const promise2 = reader.closed;
+
+ assert_not_equals(promise1, promise2, '.closed should be replaced');
+ return Promise.all([
+ promise1,
+ promise_rejects_js(t, TypeError, promise2, '.closed after releasing lock'),
+ ]);
+
+}, 'closed is replaced when stream closes and reader releases its lock');
+
+promise_test(t => {
+
+ const theError = { name: 'unique error' };
+ let controller;
+ const rs = new ReadableStream({
+ start(c) {
+ controller = c;
+ }
+ });
+
+ const reader = rs.getReader();
+ const promise1 = reader.closed;
+
+ controller.error(theError);
+
+ reader.releaseLock();
+ const promise2 = reader.closed;
+
+ assert_not_equals(promise1, promise2, '.closed should be replaced');
+ return Promise.all([
+ promise_rejects_exactly(t, theError, promise1, '.closed before releasing lock'),
+ promise_rejects_js(t, TypeError, promise2, '.closed after releasing lock')
+ ]);
+
+}, 'closed is replaced when stream errors and reader releases its lock');
+
promise_test(() => {
const rs = new ReadableStream({
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -15,6 +15,8 @@
PASS cancel() on a reader does not release the reader
PASS closed should be fulfilled after stream is closed (.closed access before acquiring)
PASS closed should be rejected after reader releases its lock (multiple stream locks)
+PASS closed is replaced when stream closes and reader releases its lock
+PASS closed is replaced when stream errors and reader releases its lock
PASS Multiple readers can access the stream in sequence
PASS Cannot use an already-released reader to unlock a stream again
PASS cancel() on a released reader is a no-op and does not pass through
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -16,7 +16,7 @@
PASS ReadableStream start should be able to return a promise
PASS ReadableStream start should be able to return a promise and reject it
PASS ReadableStream should be able to enqueue different objects.
-PASS ReadableStream: if pull rejects, it should error the stream
+FAIL ReadableStream: if pull rejects, it should error the stream assert_true: expected true got false
PASS ReadableStream: should only call pull once upon starting the stream
PASS ReadableStream: should call pull when trying to read from a started, empty stream
PASS ReadableStream: should only call pull once on a non-empty stream read from before start fulfills
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -210,7 +210,7 @@
assert_unreached('closed should be rejected');
}, e => {
closed = true;
- assert_true(read);
+ assert_false(read);
assert_equals(e, error, 'closed should be rejected with the thrown error');
}),
reader.read().then(() => {
@@ -217,7 +217,7 @@
assert_unreached('read() should be rejected');
}, e => {
read = true;
- assert_false(closed);
+ assert_true(closed);
assert_equals(e, error, 'read() should be rejected with the thrown error');
})
]);
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -16,7 +16,7 @@
PASS ReadableStream start should be able to return a promise
PASS ReadableStream start should be able to return a promise and reject it
PASS ReadableStream should be able to enqueue different objects.
-PASS ReadableStream: if pull rejects, it should error the stream
+FAIL ReadableStream: if pull rejects, it should error the stream assert_true: expected true got false
PASS ReadableStream: should only call pull once upon starting the stream
PASS ReadableStream: should call pull when trying to read from a started, empty stream
PASS ReadableStream: should only call pull once on a non-empty stream read from before start fulfills
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -1,6 +1,4 @@
-Harness Error (FAIL), message = Test named 'TransformStream constructor should not call setters for highWaterMark or size' specified 1 'cleanup' function, and 1 failed.
-
FAIL TransformStream constructor should not call setters for highWaterMark or size highWaterMark value is negative or not a number
-NOTRUN TransformStream should use the original value of ReadableStream and WritableStream
+PASS TransformStream should use the original value of ReadableStream and WritableStream
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any.js (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any.js 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any.js 2021-04-12 16:36:34 UTC (rev 275824)
@@ -7,12 +7,14 @@
test(t => {
// eslint-disable-next-line no-extend-native, accessor-pairs
Object.defineProperty(Object.prototype, 'highWaterMark', {
- set() { throw new Error('highWaterMark setter called'); }
+ set() { throw new Error('highWaterMark setter called'); },
+ configurable: true
});
// eslint-disable-next-line no-extend-native, accessor-pairs
Object.defineProperty(Object.prototype, 'size', {
- set() { throw new Error('size setter called'); }
+ set() { throw new Error('size setter called'); },
+ configurable: true
});
t.add_cleanup(() => {
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt (275823 => 275824)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt 2021-04-12 15:08:58 UTC (rev 275823)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt 2021-04-12 16:36:34 UTC (rev 275824)
@@ -1,6 +1,4 @@
-Harness Error (FAIL), message = Test named 'TransformStream constructor should not call setters for highWaterMark or size' specified 1 'cleanup' function, and 1 failed.
-
FAIL TransformStream constructor should not call setters for highWaterMark or size highWaterMark value is negative or not a number
-NOTRUN TransformStream should use the original value of ReadableStream and WritableStream
+PASS TransformStream should use the original value of ReadableStream and WritableStream