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 --- dom/file/tests/worker_blob_reading.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dom/file/tests/worker_blob_reading.js (limited to 'dom/file/tests/worker_blob_reading.js') diff --git a/dom/file/tests/worker_blob_reading.js b/dom/file/tests/worker_blob_reading.js new file mode 100644 index 0000000000..f57161c220 --- /dev/null +++ b/dom/file/tests/worker_blob_reading.js @@ -0,0 +1,26 @@ +importScripts("common_blob_reading.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.func](e.data.blob, e.data.content).then( + () => { + postMessage({ type: "done" }); + }, + exc => { + dump(exc); + dump(exc.stack); + postMessage({ type: "error", message: exc.toString() }); + } + ); +}; -- cgit v1.2.3