Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / netwerk / test / unit / test_bug388281.js
blob0790cb9d7a48ce2faa6aee9a673bd75aa955ec1b
1 const Cc = Components.classes;
2 const Ci = Components.interfaces;
4 function run_test() {
5 const ios = Cc["@mozilla.org/network/io-service;1"].
6 getService(Ci.nsIIOService);
8 var uri = ios.newURI("http://foo.com/file.txt", null, null);
9 uri.port = 90;
10 do_check_eq(uri.hostPort, "foo.com:90");
12 uri = ios.newURI("http://foo.com:10/file.txt", null, null);
13 uri.port = 500;
14 do_check_eq(uri.hostPort, "foo.com:500");
16 uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
17 uri.port = 20;
18 do_check_eq(uri.hostPort, "foo.com:20");
20 uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
21 uri.port = -1;
22 do_check_eq(uri.hostPort, "foo.com");
24 uri = ios.newURI("http://foo.com:5000/file.txt", null, null);
25 uri.port = 80;
26 do_check_eq(uri.hostPort, "foo.com");