tor-browser

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

bug-1933039.js (544B)


      1 var threw = false;
      2 try {
      3  getModuleEnvironmentNames(parseModule("{}", "", "json"))
      4 } catch (e) {
      5  threw = true;
      6  assertEq(e instanceof Error, true, "expected Error");
      7 }
      8 assertEq(threw, true, "expected an exception thrown");
      9 
     10 var m = registerModule("m", parseModule('{"test": "foo"}', "", "json"));
     11 moduleLink(m);
     12 moduleEvaluate(m);
     13 
     14 threw = false;
     15 try {
     16  getModuleEnvironmentValue(m, 'default');
     17 } catch (e) {
     18  threw = true;
     19  assertEq(e instanceof Error, true, "expected Error");
     20 }
     21 assertEq(threw, true, "expected an exception thrown");