From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../mochitest/fetch/worker_readableStreams.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dom/tests/mochitest/fetch/worker_readableStreams.js (limited to 'dom/tests/mochitest/fetch/worker_readableStreams.js') diff --git a/dom/tests/mochitest/fetch/worker_readableStreams.js b/dom/tests/mochitest/fetch/worker_readableStreams.js new file mode 100644 index 0000000000..905c73b7fa --- /dev/null +++ b/dom/tests/mochitest/fetch/worker_readableStreams.js @@ -0,0 +1,26 @@ +importScripts("common_readableStreams.js"); + +function info(message) { + postMessage({ type: "info", message }); +} + +function ok(a, message) { + postMessage({ type: "test", test: !!a, message }); +} + +function is(a, b, message) { + ok(a === b, message); +} + +onmessage = function (e) { + self[e.data](SAME_COMPARTMENT).then( + ok => { + postMessage({ type: "done" }); + }, + exc => { + dump(exc); + dump(exc.stack); + postMessage({ type: "error", message: exc.toString() }); + } + ); +}; -- cgit v1.2.3