43 function tabOpenDance() {
45 function addTab(aURL,aReferrer)
46 tabs.push(gBrowser.addTab(aURL, {referrerURI: aReferrer}));
48 addTab(
"http://localhost:8888/#0");
49 gBrowser.selectedTab =
tabs[0];
50 addTab(
"http://localhost:8888/#1");
51 addTab(
"http://localhost:8888/#2",gBrowser.currentURI);
52 addTab(
"http://localhost:8888/#3",gBrowser.currentURI);
53 gBrowser.selectedTab =
tabs[
tabs.length - 1];
54 gBrowser.selectedTab =
tabs[0];
55 addTab(
"http://localhost:8888/#4",gBrowser.currentURI);
56 gBrowser.selectedTab =
tabs[3];
57 addTab(
"http://localhost:8888/#5",gBrowser.currentURI);
58 gBrowser.removeTab(
tabs.pop());
59 addTab(
"about:blank",gBrowser.currentURI);
60 gBrowser.moveTabTo(gBrowser.selectedTab, 1);
61 addTab(
"http://localhost:8888/#6",gBrowser.currentURI);
63 addTab(
"http://localhost:8888/#7");
71 let
tabs = tabOpenDance();
73 is(
tabs[0], gBrowser.mTabs[3], "
tab without referrer was opened to the far
right");
74 is(tabs[1], gBrowser.mTabs[7], "
tab without referrer was opened to the far right");
75 is(tabs[2], gBrowser.mTabs[5], "
tab with referrer opened immediately to the right");
76 is(tabs[3], gBrowser.mTabs[1], "
next tab with referrer opened further to the right");
77 is(tabs[4], gBrowser.mTabs[4], "
tab selection changed,
tab opens immediately to the right");
78 is(tabs[5], gBrowser.mTabs[6], "blank
tab with referrer opens to the right of 3rd original
tab where removed
tab was");
79 is(tabs[6], gBrowser.mTabs[2], "
tab has moved, new
tab opens immediately to the right");
80 is(tabs[7], gBrowser.mTabs[8], "blank
tab without referrer opens at the end");
81 is(tabs[8], gBrowser.mTabs[9], "
tab without referrer opens at the end");
forEach(function(data){mainLibItems[data[0]]={track:data[1], artist:data[2], album:data[3], lastModified:data[4]};})
restoreHistoryPrecursor aTabs