2008-09-02 12:50:22 +04:00
|
|
|
function test() {
|
|
|
|
for (let i = 0; i < 9; i++)
|
|
|
|
gBrowser.addTab();
|
|
|
|
|
|
|
|
var isLinux = navigator.platform.indexOf("Linux") == 0;
|
2008-09-02 17:18:48 +04:00
|
|
|
for (let i = 9; i >= 1; i--) {
|
2008-09-02 12:50:22 +04:00
|
|
|
EventUtils.synthesizeKey(i.toString(), { altKey: isLinux, accelKey: !isLinux });
|
|
|
|
|
2010-04-09 15:18:02 +04:00
|
|
|
is(gBrowser.tabContainer.selectedIndex, (i == 9 ? gBrowser.tabs.length : i) - 1,
|
2008-09-02 12:50:22 +04:00
|
|
|
(isLinux ? "Alt" : "Accel") + "+" + i + " selects expected tab");
|
|
|
|
}
|
|
|
|
|
|
|
|
gBrowser.selectTabAtIndex(-3);
|
2010-04-09 15:18:02 +04:00
|
|
|
is(gBrowser.tabContainer.selectedIndex, gBrowser.tabs.length - 3,
|
2008-09-02 12:50:22 +04:00
|
|
|
"gBrowser.selectTabAtIndex(-3) selects expected tab");
|
|
|
|
|
|
|
|
for (let i = 0; i < 9; i++)
|
|
|
|
gBrowser.removeCurrentTab();
|
|
|
|
}
|