tor-browser

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

test_URLSearchParams.js (502B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 function run_test() {
      5  var sb = new Cu.Sandbox('http://www.example.com',
      6                          { wantGlobalProperties: ["URLSearchParams"] });
      7  sb.equal = equal;
      8  Cu.evalInSandbox('equal(new URLSearchParams("one=1&two=2").get("one"), "1");',
      9                   sb);
     10  Cu.importGlobalProperties(["URLSearchParams"]);
     11  Assert.equal(new URLSearchParams("one=1&two=2").get("one"), "1");
     12 }