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: newWindowWithTabView(onTabViewWindowLoaded); michael@0: } michael@0: michael@0: function onTabViewWindowLoaded(win) { michael@0: let contentWindow = win.TabView.getContentWindow(); michael@0: michael@0: is(contentWindow.GroupItems.groupItems.length, 1, michael@0: "There is one group item on startup"); michael@0: is(win.gBrowser.tabs.length, 1, "There is one tab on startup"); michael@0: let groupItem = contentWindow.GroupItems.groupItems[0]; michael@0: michael@0: hideGroupItem(groupItem, function () { michael@0: hideTabView(() => { michael@0: is(contentWindow.GroupItems.groupItems.length, 1, michael@0: "There is still one group item"); michael@0: isnot(groupItem, contentWindow.GroupItems.groupItems[0], 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: ok(!win.TabView.isVisible(), "Tab View is hidden"); michael@0: promiseWindowClosed(win).then(finish); michael@0: }, win); michael@0: }); michael@0: }