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