blob: e36c32a788d61341401ac88622cbe956a10b2b78 (
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
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");
}
};
|