test_bug652761.js (396B)
1 // This is just a crashtest for a url that is rejected at parse time (port 80,000) 2 3 "use strict"; 4 5 function run_test() { 6 // Bug 1301621 makes invalid ports throw 7 Assert.throws( 8 () => { 9 NetUtil.newChannel({ 10 uri: "http://localhost:80000/", 11 loadUsingSystemPrincipal: true, 12 }); 13 }, 14 /NS_ERROR_MALFORMED_URI/, 15 "invalid port" 16 ); 17 18 do_test_finished(); 19 }