tor-browser

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

execute-start.tentative.html (739B)


      1 <!DOCTYPE html>
      2 <title>Check execution of WebAssembly start function</title>
      3 
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script>
      7    setup({allow_uncaught_exception: true});
      8 
      9    const test_load = async_test(
     10        "Importing a WebAssembly module should execute the start function.");
     11 
     12    window.log = [];
     13    window.addEventListener("error", ev => {
     14      log.push(ev.message);
     15    });
     16 
     17    window.addEventListener("load", test_load.step_func_done(ev => {
     18      assert_array_equals(log, ["executed"]);
     19    }));
     20 
     21    function unreachable() { log.push("unexpected"); }
     22 </script>
     23 <script type="module" src="./resources/execute-start.wasm" onerror="unreachable()""></script>