2011-02-27 17:36:36 -08:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
2011-01-17 04:38:04 -08:00
|
|
|
|
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
newWindowWithTabView(onTabViewShown);
|
|
|
|
}
|
|
|
|
|
|
|
|
function onTabViewShown(win) {
|
|
|
|
let contentWindow = win.TabView.getContentWindow();
|
|
|
|
|
|
|
|
let finishTest = function () {
|
2011-07-23 08:07:39 -07:00
|
|
|
hideTabView(function () {
|
2011-01-17 04:38:04 -08:00
|
|
|
win.close();
|
|
|
|
finish();
|
2011-07-23 08:07:39 -07:00
|
|
|
}, win);
|
2011-01-17 04:38:04 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// do not let the group arrange itself
|
|
|
|
contentWindow.GroupItems.pauseArrange();
|
|
|
|
|
|
|
|
// let's create a groupItem small enough to get stacked
|
|
|
|
let groupItem = new contentWindow.GroupItem([], {
|
|
|
|
immediately: true,
|
|
|
|
bounds: {left: 20, top: 20, width: 100, height: 100}
|
|
|
|
});
|
|
|
|
|
2011-04-22 13:05:11 -07:00
|
|
|
contentWindow.UI.setActive(groupItem);
|
2011-01-17 04:38:04 -08:00
|
|
|
|
|
|
|
// we need seven tabs at least to reproduce this
|
|
|
|
for (var i=0; i<7; i++)
|
|
|
|
win.gBrowser.loadOneTab('about:blank', {inBackground: true});
|
|
|
|
|
|
|
|
// finally let group arrange
|
|
|
|
contentWindow.GroupItems.resumeArrange();
|
|
|
|
|
2010-11-05 06:32:00 -07:00
|
|
|
let tabItem6 = groupItem.getChildren()[5];
|
|
|
|
let tabItem7 = groupItem.getChildren()[6];
|
|
|
|
ok(!tabItem6.getHidden(), 'the 6th child must not be hidden');
|
|
|
|
ok(tabItem7.getHidden(), 'the 7th child must be hidden');
|
2011-01-17 04:38:04 -08:00
|
|
|
|
|
|
|
finishTest();
|
|
|
|
}
|