38 function tabAdded(
event) {
39 let
tab =
event.target;
45 let container = gBrowser.tabContainer;
46 container.addEventListener(
"TabOpen", tabAdded,
false);
48 gBrowser.addTab(
"about:blank");
49 BrowserSearch.loadSearch(
"mozilla",
true);
50 BrowserSearch.loadSearch(
"firefox",
true);
52 is(tabs[0], gBrowser.mTabs[3],
"blank tab has been pushed to the end");
53 is(tabs[1], gBrowser.mTabs[1],
"first search tab opens next to the current tab");
54 is(tabs[2], gBrowser.mTabs[2],
"second search tab opens next to the first search tab");
56 container.removeEventListener(
"TabOpen", tabAdded,
false);
57 tabs.forEach(gBrowser.removeTab, gBrowser);