| Index: third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/bad-underlying-sources.js
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/bad-underlying-sources.js b/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/bad-underlying-sources.js
|
| index b95b54bc7fc9a6f1446b06b85a47efe9c2dc9611..0d5b817c88e2fb4cc30fd6af2818b1d7d672575b 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/bad-underlying-sources.js
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/bad-underlying-sources.js
|
| @@ -380,4 +380,28 @@ promise_test(() => {
|
| }, 'Underlying source: calling error and returning a rejected promise from pull should cause the stream to error ' +
|
| 'with the first error');
|
|
|
| +const error1 = { name: 'error1' };
|
| +
|
| +promise_test(t => {
|
| +
|
| + let pullShouldThrow = false;
|
| + const rs = new ReadableStream({
|
| + pull(controller) {
|
| + if (pullShouldThrow) {
|
| + throw error1;
|
| + }
|
| + controller.enqueue(0);
|
| + }
|
| + }, new CountQueuingStrategy({highWaterMark: 1}));
|
| + const reader = rs.getReader();
|
| + return Promise.resolve().then(() => {
|
| + pullShouldThrow = true;
|
| + return Promise.all([
|
| + reader.read(),
|
| + promise_rejects(t, error1, reader.closed, '.closed promise should reject')
|
| + ]);
|
| + });
|
| +
|
| +}, 'read should not error if it dequeues and pull() throws');
|
| +
|
| done();
|
|
|