6 var
tabs = gBrowser.tabContainer.childNodes;
9 is(tabs.length, 4,
"4 tabs are open");
11 owner = gBrowser.selectedTab = tabs[2];
13 is(gBrowser.selectedTab, tabs[4],
"newly opened tab is selected");
14 gBrowser.removeCurrentTab();
15 is(gBrowser.selectedTab, owner,
"owner is selected");
17 owner = gBrowser.selectedTab;
19 gBrowser.selectedTab = tabs[1];
20 gBrowser.selectedTab = tabs[4];
21 gBrowser.removeCurrentTab();
22 isnot(gBrowser.selectedTab, owner,
"selecting a different tab clears the owner relation");
24 owner = gBrowser.selectedTab;
26 gBrowser.moveTabTo(gBrowser.selectedTab, 0);
27 gBrowser.removeCurrentTab();
28 is(gBrowser.selectedTab, owner,
"owner relatitionship persists when tab is moved");
30 while (tabs.length > 1)
31 gBrowser.removeCurrentTab();
BogusChannel prototype owner