From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../mochitest/fetch/worker_temporaryFileBlob.js | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 dom/tests/mochitest/fetch/worker_temporaryFileBlob.js (limited to 'dom/tests/mochitest/fetch/worker_temporaryFileBlob.js') diff --git a/dom/tests/mochitest/fetch/worker_temporaryFileBlob.js b/dom/tests/mochitest/fetch/worker_temporaryFileBlob.js new file mode 100644 index 0000000000..5e6efdd499 --- /dev/null +++ b/dom/tests/mochitest/fetch/worker_temporaryFileBlob.js @@ -0,0 +1,31 @@ +importScripts("common_temporaryFileBlob.js"); + +function info(msg) { + postMessage({ type: "info", msg }); +} + +function ok(a, msg) { + postMessage({ type: "check", what: !!a, msg }); +} + +function is(a, b, msg) { + ok(a === b, msg); +} + +function next() { + postMessage({ type: "finish" }); +} + +onmessage = function(e) { + if (e.data == "xhr") { + test_xhr_basic(); + } else if (e.data == "fetch") { + test_fetch_basic(); + } else if (e.data == "response") { + test_response_basic(); + } else if (e.data == "request") { + test_request_basic(); + } else { + ok(false, "Unknown message"); + } +}; -- cgit v1.2.3