Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
| michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
| michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
| michael@0 | 3 | |
| michael@0 | 4 | function test() { |
| michael@0 | 5 | waitForExplicitFinish(); |
| michael@0 | 6 | |
| michael@0 | 7 | let onLoad = function (win) { |
| michael@0 | 8 | for (let i = 0; i < 2; i++) |
| michael@0 | 9 | win.gBrowser.addTab(); |
| michael@0 | 10 | }; |
| michael@0 | 11 | |
| michael@0 | 12 | let onShow = function (win) { |
| michael@0 | 13 | registerCleanupFunction(function () win.close()); |
| michael@0 | 14 | |
| michael@0 | 15 | let cw = win.TabView.getContentWindow(); |
| michael@0 | 16 | let groupItem = cw.GroupItems.groupItems[0]; |
| michael@0 | 17 | |
| michael@0 | 18 | groupItem.setSize(400, 200, true); |
| michael@0 | 19 | |
| michael@0 | 20 | let tabItem = groupItem.getChild(0); |
| michael@0 | 21 | let bounds = tabItem.getBounds(); |
| michael@0 | 22 | |
| michael@0 | 23 | is(groupItem.getActiveTab(), tabItem, "the first tab is active"); |
| michael@0 | 24 | EventUtils.synthesizeMouseAtCenter(tabItem.container, {button: 1}, cw); |
| michael@0 | 25 | |
| michael@0 | 26 | is(groupItem.getChildren().indexOf(tabItem), -1, "tabItem got removed"); |
| michael@0 | 27 | ok(bounds.equals(groupItem.getChild(0).getBounds()), "tabItem bounds didn't change"); |
| michael@0 | 28 | |
| michael@0 | 29 | finish(); |
| michael@0 | 30 | }; |
| michael@0 | 31 | |
| michael@0 | 32 | newWindowWithTabView(onShow, onLoad); |
| michael@0 | 33 | } |