tor-browser

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

test_bug376844.js (644B)


      1 "use strict";
      2 
      3 const testURLs = [
      4  ["http://example.com/<", "http://example.com/%3C"],
      5  ["http://example.com/>", "http://example.com/%3E"],
      6  ["http://example.com/'", "http://example.com/'"],
      7  ['http://example.com/"', "http://example.com/%22"],
      8  ["http://example.com/?<", "http://example.com/?%3C"],
      9  ["http://example.com/?>", "http://example.com/?%3E"],
     10  ["http://example.com/?'", "http://example.com/?%27"],
     11  ['http://example.com/?"', "http://example.com/?%22"],
     12 ];
     13 
     14 function run_test() {
     15  for (var i = 0; i < testURLs.length; i++) {
     16    var uri = Services.io.newURI(testURLs[i][0]);
     17    Assert.equal(uri.spec, testURLs[i][1]);
     18  }
     19 }