tor-browser

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

out-of-tree-apis.js (639B)


      1 /**
      2  * This tests APIs that are relied on by external consumers such as fuzzers,
      3  * which could be broken if modified with regard only to in-tree code.
      4  */
      5 
      6 // getRealmConfiguration and getBuildConfiguration
      7 // If API changes are planned here, be sure to notify anyone who is fuzzing SM.
      8 
      9 config = getRealmConfiguration();
     10 
     11 assertEq(typeof config, "object");
     12 
     13 for (const [key, value] of Object.entries(config)) {
     14  assertEq(getRealmConfiguration(key), value);
     15 }
     16 
     17 config = getBuildConfiguration();
     18 
     19 assertEq(typeof config, "object");
     20 
     21 for (const [key, value] of Object.entries(config)) {
     22  assertEq(getBuildConfiguration(key), value);
     23 }