Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 let contentWindow;
5 let contentElement;
7 function test() {
8 waitForExplicitFinish();
10 registerCleanupFunction(function() {
11 if (gBrowser.tabs.length > 1)
12 gBrowser.removeTab(gBrowser.tabs[1]);
13 hideTabView();
14 });
16 showTabView(function() {
17 contentWindow = TabView.getContentWindow();
18 contentElement = contentWindow.document.getElementById("content");
19 test1();
20 });
21 }
23 function test1() {
24 let groupItems = contentWindow.GroupItems.groupItems;
25 is(groupItems.length, 1, "there is one groupItem");
27 whenTabViewIsHidden(function() {
28 gBrowser.selectedTab = gBrowser.tabs[0];
29 is(groupItems.length, 2, "there are two groupItems");
30 closeGroupItem(groupItems[1], finish);
31 });
33 // double click
34 doubleClick(contentElement, 0);
35 }
37 function doubleClick(targetElement, buttonCode) {
38 EventUtils.sendMouseEvent(
39 { type: "dblclick", button: buttonCode }, targetElement, contentWindow);
40 }