michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: let contentWindow; michael@0: let contentElement; michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: registerCleanupFunction(function() { michael@0: if (gBrowser.tabs.length > 1) michael@0: gBrowser.removeTab(gBrowser.tabs[1]); michael@0: hideTabView(); michael@0: }); michael@0: michael@0: showTabView(function() { michael@0: contentWindow = TabView.getContentWindow(); michael@0: contentElement = contentWindow.document.getElementById("content"); michael@0: test1(); michael@0: }); michael@0: } michael@0: michael@0: function test1() { michael@0: let groupItems = contentWindow.GroupItems.groupItems; michael@0: is(groupItems.length, 1, "there is one groupItem"); michael@0: michael@0: whenTabViewIsHidden(function() { michael@0: gBrowser.selectedTab = gBrowser.tabs[0]; michael@0: is(groupItems.length, 2, "there are two groupItems"); michael@0: closeGroupItem(groupItems[1], finish); michael@0: }); michael@0: michael@0: // double click michael@0: doubleClick(contentElement, 0); michael@0: } michael@0: michael@0: function doubleClick(targetElement, buttonCode) { michael@0: EventUtils.sendMouseEvent( michael@0: { type: "dblclick", button: buttonCode }, targetElement, contentWindow); michael@0: } michael@0: