1 var ssm = Services.scriptSecurityManager;
3 function makeURI(uri) {
4 return Services.io.newURI(uri);
7 function createPrincipal(aURI) {
9 var uri = makeURI(aURI);
10 var principal = ssm.createContentPrincipal(uri, {});
18 Assert.equal(createPrincipal("http://test^test/foo^bar#x^y"), null);
20 Assert.equal(createPrincipal("http://test^test/foo\\bar"), null);
22 Assert.equal(createPrincipal("http://test:2^3/foo\\bar"), null);
25 createPrincipal("http://test/foo^bar").exposableSpec,
26 "http://test/foo%5Ebar"