3 function do_info(text
, stack
) {
5 stack
= Components
.stack
.caller
;
22 ["http://mozilla.org/", "http://mozilla.org/somewhere/there", true],
23 ["http://mozilla.org/", "http://www.mozilla.org/", false],
24 ["http://mozilla.org/", "http://mozilla.org:80", true],
25 ["http://mozilla.org/", "http://mozilla.org:90", false],
26 ["http://mozilla.org", "https://mozilla.org", false],
27 ["http://mozilla.org", "https://mozilla.org:80", false],
28 ["http://mozilla.org:443", "https://mozilla.org", false],
29 ["https://mozilla.org:443", "https://mozilla.org", true],
30 ["https://mozilla.org:443", "https://mozilla.org/somewhere/", true],
31 ["about:", "about:", false],
32 ["data:text/plain,text", "data:text/plain,text", false],
33 ["about:blank", "about:blank", false],
34 ["about:", "http://mozilla.org/", false],
35 ["about:", "about:config", false],
36 ["about:text/plain,text", "data:text/plain,text", false],
37 ["jar:http://mozilla.org/!/", "http://mozilla.org/", true],
38 ["view-source:http://mozilla.org/", "http://mozilla.org/", true],
41 tests
.forEach(function (aTest
) {
42 do_info("Comparing " + aTest
[0] + " to " + aTest
[1]);
44 var uri1
= NetUtil
.newURI(aTest
[0]);
45 var uri2
= NetUtil
.newURI(aTest
[1]);
49 Services
.scriptSecurityManager
.checkSameOriginURI(
59 Assert
.equal(equal
, aTest
[2]);