|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 function test() { |
|
5 waitForExplicitFinish(); |
|
6 newWindowWithTabView(onTabViewWindowLoaded); |
|
7 } |
|
8 |
|
9 function onTabViewWindowLoaded(win) { |
|
10 let contentWindow = win.TabView.getContentWindow(); |
|
11 |
|
12 is(contentWindow.GroupItems.groupItems.length, 1, |
|
13 "There is one group item on startup"); |
|
14 is(win.gBrowser.tabs.length, 1, "There is one tab on startup"); |
|
15 let groupItem = contentWindow.GroupItems.groupItems[0]; |
|
16 |
|
17 hideGroupItem(groupItem, function () { |
|
18 hideTabView(() => { |
|
19 is(contentWindow.GroupItems.groupItems.length, 1, |
|
20 "There is still one group item"); |
|
21 isnot(groupItem, contentWindow.GroupItems.groupItems[0], |
|
22 "The initial group item is not the same as the final group item"); |
|
23 is(win.gBrowser.tabs.length, 1, "There is only one tab"); |
|
24 ok(!win.TabView.isVisible(), "Tab View is hidden"); |
|
25 promiseWindowClosed(win).then(finish); |
|
26 }, win); |
|
27 }); |
|
28 } |