11cb0ef41Sopenharmony_ci<!DOCTYPE html>
21cb0ef41Sopenharmony_ci<html class="test-wait">
31cb0ef41Sopenharmony_ci<script id="workerScript" type="text/worker">
41cb0ef41Sopenharmony_ci  // Blob will pass a huge Uint8Array object whose stringification will take long
51cb0ef41Sopenharmony_ci  const encoder = new TextEncoderStream()
61cb0ef41Sopenharmony_ci  const blob = new Blob([new ArrayBuffer(1338720)])
71cb0ef41Sopenharmony_ci  const writable = new WritableStream()
81cb0ef41Sopenharmony_ci  blob.stream().pipeThrough(encoder).pipeTo(writable)
91cb0ef41Sopenharmony_ci  // Wait a bit for the piping to start
101cb0ef41Sopenharmony_ci  Promise.resolve().then(() => postMessage('started'));
111cb0ef41Sopenharmony_ci</script>
121cb0ef41Sopenharmony_ci<script>
131cb0ef41Sopenharmony_ci  const worker = new Worker(URL.createObjectURL(new Blob([
141cb0ef41Sopenharmony_ci    document.getElementById("workerScript").textContent
151cb0ef41Sopenharmony_ci  ])))
161cb0ef41Sopenharmony_ci  worker.onmessage = () => {
171cb0ef41Sopenharmony_ci    worker.terminate();
181cb0ef41Sopenharmony_ci    document.documentElement.classList.remove("test-wait");
191cb0ef41Sopenharmony_ci  };
201cb0ef41Sopenharmony_ci</script>
21