Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(942)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/streams/piping/transform-streams.js

Issue 2642393002: Import wpt@40665266227e475bc4a56884247d8c09d78dfb6a (Closed)
Patch Set: rebaseline-cl Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/streams/piping/transform-streams.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/transform-streams.js b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/transform-streams.js
new file mode 100644
index 0000000000000000000000000000000000000000..8f6804a2227d7a2c05869785437a07e83ea9e487
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/streams/piping/transform-streams.js
@@ -0,0 +1,27 @@
+'use strict';
+
+if (self.importScripts) {
+ self.importScripts('/resources/testharness.js');
+}
+
+promise_test(() => {
+ const rs = new ReadableStream({
+ start(c) {
+ c.enqueue('a');
+ c.enqueue('b');
+ c.enqueue('c');
+ c.close();
+ }
+ });
+
+ const ts = new TransformStream();
+
+ const ws = new WritableStream();
+
+ return rs.pipeThrough(ts).pipeTo(ws).then(() => {
+ const writer = ws.getWriter();
+ return writer.closed;
+ });
+}, 'Piping through an identity transform stream should close the destination when the source closes');
+
+done();

Powered by Google App Engine
This is Rietveld 408576698