const url = "http://foo.com/folder/file?/.";

function run_test() {
  var ios = Cc["@mozilla.org/network/io-service;1"].
    getService(Ci.nsIIOService);

  var newURI = ios.newURI(url);
  do_check_eq(newURI.spec, url);
  do_check_eq(newURI.pathQueryRef, "/folder/file?/.");
  do_check_eq(newURI.resolve("./file?/."), url);
}
