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: let onLoad = function (win) { michael@0: for (let i = 0; i < 2; i++) michael@0: win.gBrowser.addTab(); michael@0: }; michael@0: michael@0: let onShow = function (win) { michael@0: registerCleanupFunction(function () win.close()); michael@0: michael@0: let cw = win.TabView.getContentWindow(); michael@0: let groupItem = cw.GroupItems.groupItems[0]; michael@0: michael@0: groupItem.setSize(400, 200, true); michael@0: michael@0: let tabItem = groupItem.getChild(0); michael@0: let bounds = tabItem.getBounds(); michael@0: michael@0: is(groupItem.getActiveTab(), tabItem, "the first tab is active"); michael@0: EventUtils.synthesizeMouseAtCenter(tabItem.container, {button: 1}, cw); michael@0: michael@0: is(groupItem.getChildren().indexOf(tabItem), -1, "tabItem got removed"); michael@0: ok(bounds.equals(groupItem.getChild(0).getBounds()), "tabItem bounds didn't change"); michael@0: michael@0: finish(); michael@0: }; michael@0: michael@0: newWindowWithTabView(onShow, onLoad); michael@0: }