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() { michael@0: win.close(); michael@0: }); michael@0: michael@0: let cw = win.TabView.getContentWindow(); michael@0: michael@0: let groupItemOne = cw.GroupItems.groupItems[0]; michael@0: is(groupItemOne.getChildren().length, 1, "Group one has 1 tab item"); michael@0: michael@0: let groupItemTwo = createGroupItemWithBlankTabs(win, 300, 300, 40, 1); michael@0: is(groupItemTwo.getChildren().length, 1, "Group two has 1 tab items"); michael@0: michael@0: whenTabViewIsHidden(function() { michael@0: win.gBrowser.removeTab(win.gBrowser.selectedTab); michael@0: executeSoon(function() { michael@0: win.undoCloseTab(); michael@0: michael@0: groupItemTwo.addSubscriber("childAdded", function onChildAdded(data) { michael@0: groupItemTwo.removeSubscriber("childAdded", onChildAdded); michael@0: michael@0: is(groupItemOne.getChildren().length, 1, "Group one still has 1 tab item"); michael@0: is(groupItemTwo.getChildren().length, 1, "Group two still has 1 tab item"); michael@0: }); michael@0: michael@0: finish(); michael@0: }); michael@0: }, win); michael@0: groupItemTwo.getChild(0).zoomIn(); michael@0: }, function(win) { michael@0: let newTab = win.gBrowser.addTab(); michael@0: win.gBrowser.pinTab(newTab); michael@0: }); michael@0: }