tor-browser

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

source-phase-import-non-UTF8.tentative.html (565B)


      1 <!doctype html>
      2 <title>Import a Wasm module that cannot be encoded in UTF-8</title>
      3 
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script type=module>
      7 setup({ single_test: true });
      8 
      9 // Tests that the browser can properly handle Wasm binaries that cannot be
     10 // encoded as UTF-8 strings.
     11 import source nonUtf8 from "./resources/non-UTF8.wasm";
     12 
     13 assert_true(nonUtf8 instanceof WebAssembly.Module);
     14 
     15 assert_array_equals(WebAssembly.Module.exports(nonUtf8).map(({ name }) => name), ["f"]);
     16 
     17 done();
     18 </script>