tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

transform-streams.any.js (518B)


      1 // META: global=window,worker,shadowrealm
      2 'use strict';
      3 
      4 promise_test(() => {
      5  const rs = new ReadableStream({
      6    start(c) {
      7      c.enqueue('a');
      8      c.enqueue('b');
      9      c.enqueue('c');
     10      c.close();
     11    }
     12  });
     13 
     14  const ts = new TransformStream();
     15 
     16  const ws = new WritableStream();
     17 
     18  return rs.pipeThrough(ts).pipeTo(ws).then(() => {
     19    const writer = ws.getWriter();
     20    return writer.closed;
     21  });
     22 }, 'Piping through an identity transform stream should close the destination when the source closes');