4 var base = NetUtil.newURI("http://www.example.com");
5 var about1 = NetUtil.newURI("about:blank");
6 var about2 = NetUtil.newURI("about:blank", null, base);
8 var chan1 = NetUtil.newChannel({
10 loadUsingSystemPrincipal: true,
11 }).QueryInterface(Ci.nsIPropertyBag2);
13 var chan2 = NetUtil.newChannel({
15 loadUsingSystemPrincipal: true,
16 }).QueryInterface(Ci.nsIPropertyBag2);
21 propVal = chan1.getPropertyAsInterface("baseURI", Ci.nsIURI);
24 if (e.result != Cr.NS_ERROR_NOT_AVAILABLE) {
27 // Property shouldn't be there.
29 Assert.equal(propVal, null);
30 Assert.equal(haveProp, false);
31 Assert.equal(chan2.getPropertyAsInterface("baseURI", Ci.nsIURI), base);