6 function rect(ele) ele.getBoundingClientRect();
11 function
isRight(ele, msg) is(right(ele), right(scrollbox), msg);
21 var tabMinWidth =
gPrefService.getIntPref(
"browser.tabs.tabMinWidth");
22 var tabCountForOverflow = Math.ceil(
width(
tabstrip) / tabMinWidth * 3);
23 while (
tabContainer.childNodes.length < tabCountForOverflow)
30 if (aEvent.detail != 1)
35 var upButton =
tabstrip._scrollButtonUp;
36 var downButton =
tabstrip._scrollButtonDown;
43 EventUtils.synthesizeMouse(downButton, 0, 0, {});
44 isRight(element,
"Scrolled one tab to the right with a single click");
50 EventUtils.synthesizeMouse(upButton, 0, 0, {});
51 isLeft(element,
"Scrolled one tab to the left with a single click");
54 EventUtils.synthesizeMouse(upButton, 0, 0, {clickCount: 2});
55 isLeft(element,
"Scrolled one page of tabs with a double click");
57 EventUtils.synthesizeMouse(upButton, 0, 0, {clickCount: 3});
61 EventUtils.synthesizeMouseScroll(
scrollbox, 0, 0, {delta: 1});
62 isRight(element,
"Scrolled one tab to the right with the mouse wheel");