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(function (win) { michael@0: registerCleanupFunction(function () win.close()); michael@0: michael@0: let cw = win.TabView.getContentWindow(); michael@0: let groupItems = cw.GroupItems.groupItems; michael@0: let groupItem = groupItems[0]; michael@0: michael@0: is(groupItems.length, 1, "There is one group item on startup"); michael@0: michael@0: whenTabViewIsHidden(function () { michael@0: is(groupItems.length, 1, "There is still one group item"); michael@0: isnot(groupItem.id, groupItems[0].id, michael@0: "The initial group item is not the same as the final group item"); michael@0: is(win.gBrowser.tabs.length, 1, "There is only one tab"); michael@0: michael@0: finish(); michael@0: }, win); michael@0: michael@0: hideGroupItem(groupItem, function () { michael@0: // create a new tab michael@0: EventUtils.synthesizeKey("t", { accelKey: true }, cw); michael@0: }); michael@0: }); michael@0: }