Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / netwerk / test / unit / test_aboutblank.js
blob2d5c92f095298f9bc536891eb8e65cc9616b74f4
1 "use strict";
3 function run_test() {
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({
9 uri: about1,
10 loadUsingSystemPrincipal: true,
11 }).QueryInterface(Ci.nsIPropertyBag2);
13 var chan2 = NetUtil.newChannel({
14 uri: about2,
15 loadUsingSystemPrincipal: true,
16 }).QueryInterface(Ci.nsIPropertyBag2);
18 var haveProp = false;
19 var propVal = null;
20 try {
21 propVal = chan1.getPropertyAsInterface("baseURI", Ci.nsIURI);
22 haveProp = true;
23 } catch (e) {
24 if (e.result != Cr.NS_ERROR_NOT_AVAILABLE) {
25 throw e;
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);