blob: 50f071bab76368c2cf70d0dc8fa2604c30fceea0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* 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");
}
};
|