2011-02-27 17:36:36 -08:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
2011-01-09 19:23:56 -08:00
|
|
|
|
|
|
|
let contentWindow;
|
2011-04-14 10:02:32 -07:00
|
|
|
let contentElement;
|
2011-01-09 19:23:56 -08:00
|
|
|
|
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
2011-06-12 21:06:27 -07:00
|
|
|
registerCleanupFunction(function() {
|
|
|
|
if (gBrowser.tabs.length > 1)
|
|
|
|
gBrowser.removeTab(gBrowser.tabs[1]);
|
2011-08-09 10:13:54 -07:00
|
|
|
hideTabView();
|
2011-06-12 21:06:27 -07:00
|
|
|
});
|
|
|
|
|
2011-04-14 10:02:32 -07:00
|
|
|
showTabView(function() {
|
|
|
|
contentWindow = TabView.getContentWindow();
|
|
|
|
contentElement = contentWindow.document.getElementById("content");
|
|
|
|
test1();
|
|
|
|
});
|
2011-01-09 19:23:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
function test1() {
|
2011-07-04 15:23:35 -07:00
|
|
|
let groupItems = contentWindow.GroupItems.groupItems;
|
|
|
|
is(groupItems.length, 1, "there is one groupItem");
|
2011-01-09 19:23:56 -08:00
|
|
|
|
2011-04-14 10:02:32 -07:00
|
|
|
whenTabViewIsHidden(function() {
|
2011-08-15 07:03:39 -07:00
|
|
|
gBrowser.selectedTab = gBrowser.tabs[0];
|
2011-07-04 15:23:35 -07:00
|
|
|
is(groupItems.length, 2, "there are two groupItems");
|
|
|
|
closeGroupItem(groupItems[1], finish);
|
2011-04-14 10:02:32 -07:00
|
|
|
});
|
2011-01-09 19:23:56 -08:00
|
|
|
|
2012-02-03 05:10:30 -08:00
|
|
|
// double click
|
|
|
|
doubleClick(contentElement, 0);
|
2011-01-09 19:23:56 -08:00
|
|
|
}
|
|
|
|
|
2012-02-03 05:10:30 -08:00
|
|
|
function doubleClick(targetElement, buttonCode) {
|
2011-01-09 19:23:56 -08:00
|
|
|
EventUtils.sendMouseEvent(
|
2012-02-03 05:10:30 -08:00
|
|
|
{ type: "dblclick", button: buttonCode }, targetElement, contentWindow);
|
2011-01-09 19:23:56 -08:00
|
|
|
}
|
2011-06-12 21:06:27 -07:00
|
|
|
|