michael@0: function run_test() { michael@0: const ios = Components.classes["@mozilla.org/network/io-service;1"] michael@0: .getService(Components.interfaces.nsIIOService); michael@0: michael@0: var base = ios.newURI("http://localhost/bug379034/index.html", null, null); michael@0: michael@0: var uri = ios.newURI("http:a.html", null, base); michael@0: do_check_eq(uri.spec, "http://localhost/bug379034/a.html"); michael@0: michael@0: uri = ios.newURI("HtTp:b.html", null, base); michael@0: do_check_eq(uri.spec, "http://localhost/bug379034/b.html"); michael@0: michael@0: uri = ios.newURI("https:c.html", null, base); michael@0: do_check_eq(uri.spec, "https://c.html/"); michael@0: michael@0: uri = ios.newURI("./https:d.html", null, base); michael@0: do_check_eq(uri.spec, "http://localhost/bug379034/https:d.html"); michael@0: }