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.
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 | let contentWindow; |
michael@0 | 5 | let contentElement; |
michael@0 | 6 | |
michael@0 | 7 | function test() { |
michael@0 | 8 | waitForExplicitFinish(); |
michael@0 | 9 | |
michael@0 | 10 | registerCleanupFunction(function() { |
michael@0 | 11 | if (gBrowser.tabs.length > 1) |
michael@0 | 12 | gBrowser.removeTab(gBrowser.tabs[1]); |
michael@0 | 13 | hideTabView(); |
michael@0 | 14 | }); |
michael@0 | 15 | |
michael@0 | 16 | showTabView(function() { |
michael@0 | 17 | contentWindow = TabView.getContentWindow(); |
michael@0 | 18 | contentElement = contentWindow.document.getElementById("content"); |
michael@0 | 19 | test1(); |
michael@0 | 20 | }); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | function test1() { |
michael@0 | 24 | let groupItems = contentWindow.GroupItems.groupItems; |
michael@0 | 25 | is(groupItems.length, 1, "there is one groupItem"); |
michael@0 | 26 | |
michael@0 | 27 | whenTabViewIsHidden(function() { |
michael@0 | 28 | gBrowser.selectedTab = gBrowser.tabs[0]; |
michael@0 | 29 | is(groupItems.length, 2, "there are two groupItems"); |
michael@0 | 30 | closeGroupItem(groupItems[1], finish); |
michael@0 | 31 | }); |
michael@0 | 32 | |
michael@0 | 33 | // double click |
michael@0 | 34 | doubleClick(contentElement, 0); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | function doubleClick(targetElement, buttonCode) { |
michael@0 | 38 | EventUtils.sendMouseEvent( |
michael@0 | 39 | { type: "dblclick", button: buttonCode }, targetElement, contentWindow); |
michael@0 | 40 | } |
michael@0 | 41 |