gecko-dev/netwerk/test/unit/test_bug652761.js
Manish Goregaokar 65e072aa45 Bug 1301621 - Parse URL ports as 16 bit; r=valentin
MozReview-Commit-ID: 5FbRUsYzJdy

--HG--
extra : rebase_source : dba9575a3d3a56560f39a81c6a3431da4e21f3e9
2016-09-09 15:42:42 +08:00

18 lines
414 B
JavaScript

// This is just a crashtest for a url that is rejected at parse time (port 80,000)
Cu.import("resource://gre/modules/NetUtil.jsm");
function run_test()
{
// Bug 1301621 makes invalid ports throw
Assert.throws(() => {
var chan = NetUtil.newChannel({
uri: "http://localhost:80000/",
loadUsingSystemPrincipal: true
});
}, "invalid port");
do_test_finished();
}