|
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(function (win) { |
|
8 registerCleanupFunction(function () win.close()); |
|
9 |
|
10 let cw = win.TabView.getContentWindow(); |
|
11 let groupItems = cw.GroupItems.groupItems; |
|
12 let groupItem = groupItems[0]; |
|
13 |
|
14 is(groupItems.length, 1, "There is one group item on startup"); |
|
15 |
|
16 whenTabViewIsHidden(function () { |
|
17 is(groupItems.length, 1, "There is still one group item"); |
|
18 isnot(groupItem.id, groupItems[0].id, |
|
19 "The initial group item is not the same as the final group item"); |
|
20 is(win.gBrowser.tabs.length, 1, "There is only one tab"); |
|
21 |
|
22 finish(); |
|
23 }, win); |
|
24 |
|
25 hideGroupItem(groupItem, function () { |
|
26 // create a new tab |
|
27 EventUtils.synthesizeKey("t", { accelKey: true }, cw); |
|
28 }); |
|
29 }); |
|
30 } |