1 const Cc = Components.classes;
2 const Ci = Components.interfaces;
3 const Cr = Components.results;
6 var ios = Cc["@mozilla.org/network/io-service;1"].
7 getService(Ci.nsIIOService);
9 var newURI = ios.newURI("http://foo.com", null, null);
13 newURI.spec = "http: //foo.com";
16 success = e.result == Cr.NS_ERROR_MALFORMED_URI;
19 do_throw("We didn't throw NS_ERROR_MALFORMED_URI when a space was passed in the hostname!");
23 newURI.host = " foo.com";
26 success = e.result == Cr.NS_ERROR_MALFORMED_URI;
29 do_throw("We didn't throw NS_ERROR_MALFORMED_URI when a space was passed in the hostname!");