|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 function test() { |
|
5 waitForExplicitFinish(); |
|
6 |
|
7 newWindowWithTabView(onTabViewShown); |
|
8 } |
|
9 |
|
10 function onTabViewShown(win) { |
|
11 let contentWindow = win.TabView.getContentWindow(); |
|
12 |
|
13 let finishTest = function () { |
|
14 hideTabView(function () { |
|
15 win.close(); |
|
16 finish(); |
|
17 }, win); |
|
18 } |
|
19 |
|
20 // do not let the group arrange itself |
|
21 contentWindow.GroupItems.pauseArrange(); |
|
22 |
|
23 // let's create a groupItem small enough to get stacked |
|
24 let groupItem = new contentWindow.GroupItem([], { |
|
25 immediately: true, |
|
26 bounds: {left: 20, top: 20, width: 100, height: 100} |
|
27 }); |
|
28 |
|
29 contentWindow.UI.setActive(groupItem); |
|
30 |
|
31 // we need seven tabs at least to reproduce this |
|
32 for (var i=0; i<7; i++) |
|
33 win.gBrowser.loadOneTab('about:blank', {inBackground: true}); |
|
34 |
|
35 // finally let group arrange |
|
36 contentWindow.GroupItems.resumeArrange(); |
|
37 |
|
38 let tabItem6 = groupItem.getChildren()[5]; |
|
39 let tabItem7 = groupItem.getChildren()[6]; |
|
40 ok(!tabItem6.getHidden(), 'the 6th child must not be hidden'); |
|
41 ok(tabItem7.getHidden(), 'the 7th child must be hidden'); |
|
42 |
|
43 finishTest(); |
|
44 } |