1
0
Fork 0
firefox/dom/tests/mochitest/fetch/worker_temporaryFileBlob.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

31 lines
598 B
JavaScript

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");
}
};