11cb0ef41Sopenharmony_ci<!DOCTYPE html>
21cb0ef41Sopenharmony_ci<meta charset="utf-8">
31cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script>
41cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script>
51cb0ef41Sopenharmony_ci<script src="resources/helpers.js"></script>
61cb0ef41Sopenharmony_ci<script>
71cb0ef41Sopenharmony_ci'use strict';
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_cipromise_test(t => {
101cb0ef41Sopenharmony_ci  const orig = createOriginalReadableStream();
111cb0ef41Sopenharmony_ci  const w = new SharedWorker('resources/receiving-shared-worker.js');
121cb0ef41Sopenharmony_ci  const promise = checkTestResults(w.port);
131cb0ef41Sopenharmony_ci  w.port.postMessage(orig, [orig]);
141cb0ef41Sopenharmony_ci  assert_true(orig.locked, 'the original stream should be locked');
151cb0ef41Sopenharmony_ci  return promise;
161cb0ef41Sopenharmony_ci}, 'worker.postMessage should be able to transfer a ReadableStream');
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_cipromise_test(t => {
191cb0ef41Sopenharmony_ci  const w = new SharedWorker('resources/sending-shared-worker.js');
201cb0ef41Sopenharmony_ci  const promise = testMessageEventOrErrorMessage(w.port);
211cb0ef41Sopenharmony_ci  w.port.start();
221cb0ef41Sopenharmony_ci  return promise;
231cb0ef41Sopenharmony_ci}, 'postMessage in a worker should be able to transfer a ReadableStream');
241cb0ef41Sopenharmony_ci
251cb0ef41Sopenharmony_ci</script>
26