tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

worker_temporaryFileBlob.js (598B)


      1 importScripts("common_temporaryFileBlob.js");
      2 
      3 function info(msg) {
      4  postMessage({ type: "info", msg });
      5 }
      6 
      7 function ok(a, msg) {
      8  postMessage({ type: "check", what: !!a, msg });
      9 }
     10 
     11 function is(a, b, msg) {
     12  ok(a === b, msg);
     13 }
     14 
     15 function next() {
     16  postMessage({ type: "finish" });
     17 }
     18 
     19 onmessage = function (e) {
     20  if (e.data == "xhr") {
     21    test_xhr_basic();
     22  } else if (e.data == "fetch") {
     23    test_fetch_basic();
     24  } else if (e.data == "response") {
     25    test_response_basic();
     26  } else if (e.data == "request") {
     27    test_request_basic();
     28  } else {
     29    ok(false, "Unknown message");
     30  }
     31 };