1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/test/unit/test_bug376844.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +const testURLs = [ 1.5 + ["http://example.com/<", "http://example.com/%3C"], 1.6 + ["http://example.com/>", "http://example.com/%3E"], 1.7 + ["http://example.com/'", "http://example.com/%27"], 1.8 + ["http://example.com/\"", "http://example.com/%22"], 1.9 + ["http://example.com/?<", "http://example.com/?%3C"], 1.10 + ["http://example.com/?>", "http://example.com/?%3E"], 1.11 + ["http://example.com/?'", "http://example.com/?%27"], 1.12 + ["http://example.com/?\"", "http://example.com/?%22"] 1.13 +] 1.14 + 1.15 +function run_test() { 1.16 + var ioServ = 1.17 + Cc["@mozilla.org/network/io-service;1"]. 1.18 + getService(Ci.nsIIOService); 1.19 + 1.20 + for (var i = 0; i < testURLs.length; i++) { 1.21 + var uri = ioServ.newURI(testURLs[i][0], null, null); 1.22 + do_check_eq(uri.spec, testURLs[i][1]); 1.23 + } 1.24 +}