From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- dom/workers/test/fileBlobSubWorker_worker.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 dom/workers/test/fileBlobSubWorker_worker.js (limited to 'dom/workers/test/fileBlobSubWorker_worker.js') diff --git a/dom/workers/test/fileBlobSubWorker_worker.js b/dom/workers/test/fileBlobSubWorker_worker.js new file mode 100644 index 0000000000..170362b1a4 --- /dev/null +++ b/dom/workers/test/fileBlobSubWorker_worker.js @@ -0,0 +1,17 @@ +/** + * Expects a blob. Returns an object containing the size, type. + * Used to test posting of blob from worker to worker. + */ +onmessage = function (event) { + var worker = new Worker("fileBlob_worker.js"); + + worker.postMessage(event.data); + + worker.onmessage = function (msg) { + postMessage(msg.data); + }; + + worker.onerror = function (error) { + postMessage(undefined); + }; +}; -- cgit v1.2.3