fune/dom/xhr/tests/worker_temporaryFileBlob.js
Shashank Kaushik 059c1179f1 Bug 1532933 - Enable ESLint for dom/xhr (manual changes). r=Standard8,baku
Depends on D45680

Differential Revision: https://phabricator.services.mozilla.com/D45683

--HG--
extra : moz-landing-system : lando
2019-09-15 13:07:10 +00:00

30 lines
550 B
JavaScript

/* eslint-env worker */
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");
}
};