2011-02-27 17:36:36 -08:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
2010-12-08 18:13:12 -08:00
|
|
|
|
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
2011-07-04 15:23:35 -07:00
|
|
|
newWindowWithTabView(function (win) {
|
|
|
|
registerCleanupFunction(function () win.close());
|
2010-12-08 18:13:12 -08:00
|
|
|
|
2011-07-04 15:23:35 -07:00
|
|
|
let cw = win.TabView.getContentWindow();
|
|
|
|
let groupItems = cw.GroupItems.groupItems;
|
|
|
|
let groupItem = groupItems[0];
|
2010-12-08 18:13:12 -08:00
|
|
|
|
2011-07-04 15:23:35 -07:00
|
|
|
is(groupItems.length, 1, "There is one group item on startup");
|
2010-12-08 18:13:12 -08:00
|
|
|
|
2011-07-04 15:23:35 -07:00
|
|
|
whenTabViewIsHidden(function () {
|
|
|
|
is(groupItems.length, 1, "There is still one group item");
|
|
|
|
isnot(groupItem.id, groupItems[0].id,
|
2010-12-08 18:13:12 -08:00
|
|
|
"The initial group item is not the same as the final group item");
|
2011-07-04 15:23:35 -07:00
|
|
|
is(win.gBrowser.tabs.length, 1, "There is only one tab");
|
2010-12-08 18:13:12 -08:00
|
|
|
|
|
|
|
finish();
|
2011-07-04 15:23:35 -07:00
|
|
|
}, win);
|
2010-12-08 18:13:12 -08:00
|
|
|
|
2011-07-04 15:23:35 -07:00
|
|
|
hideGroupItem(groupItem, function () {
|
|
|
|
// create a new tab
|
|
|
|
EventUtils.synthesizeKey("t", { accelKey: true }, cw);
|
|
|
|
});
|
2010-12-08 18:13:12 -08:00
|
|
|
});
|
|
|
|
}
|