1
0
Fork 0
firefox/dom/xhr/tests/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

33 lines
620 B
JavaScript

/* eslint-env worker */
/* eslint-disable mozilla/no-comparison-or-assignment-inside-ok */
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 == "simple") {
test_simple();
} else if (e.data == "abort") {
test_abort();
} else if (e.data == "reuse") {
test_reuse();
} else {
ok(false, "Something wrong happened");
}
};