tor-browser

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

worker_temporaryFileBlob.js (620B)


      1 /* eslint-env worker */
      2 
      3 /* eslint-disable mozilla/no-comparison-or-assignment-inside-ok */
      4 
      5 importScripts("common_temporaryFileBlob.js");
      6 
      7 function info(msg) {
      8  postMessage({ type: "info", msg });
      9 }
     10 
     11 function ok(a, msg) {
     12  postMessage({ type: "check", what: !!a, msg });
     13 }
     14 
     15 function is(a, b, msg) {
     16  ok(a === b, msg);
     17 }
     18 
     19 function next() {
     20  postMessage({ type: "finish" });
     21 }
     22 
     23 onmessage = function (e) {
     24  if (e.data == "simple") {
     25    test_simple();
     26  } else if (e.data == "abort") {
     27    test_abort();
     28  } else if (e.data == "reuse") {
     29    test_reuse();
     30  } else {
     31    ok(false, "Something wrong happened");
     32  }
     33 };