4 handleEvent :
function (e) {
18 var newTab = gBrowser.addTab();
19 gBrowser.selectedTab = newTab;
20 newBrowser = gBrowser.getBrowserForTab(newTab);
24 newBrowser.contentWindow.location =
'http://test1.example.org/';
28 is(
gIdentityHandler._lastLocation.host,
'test1.example.org',
"Identity handler is getting the full location");
29 is(
gIdentityHandler.getEffectiveHost(),
'example.org',
"getEffectiveHost should return example.org for test1.example.org");
32 newBrowser.contentWindow.location =
'http://sub1.test1.example.org:8000/';
37 is(
gIdentityHandler._lastLocation.host,
'sub1.test1.example.org:8000',
"Identity handler is getting port information");
38 is(
gIdentityHandler.getEffectiveHost(),
'example.org',
"getEffectiveHost should return example.org for sub1.test1.example.org:8000");
41 newBrowser.contentWindow.location =
'http://127.0.0.1:8888/';
45 is(
gIdentityHandler.getEffectiveHost(),
'127.0.0.1',
"getEffectiveHost should return 127.0.0.1 for 127.0.0.1:8888");
47 gBrowser.removeCurrentTab();
function testNormalDomainWithPort()
function testNormalDomain()
function testIPWithPort()