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 function test() {
5 waitForExplicitFinish();
7 function onLoad(win) {
8 registerCleanupFunction(function () win.close());
10 let tab = win.gBrowser.addTab();
11 win.gBrowser.pinTab(tab);
12 }
14 function onShow(win) {
15 let tabs = win.gBrowser.tabs;
17 // zoom into normal tab
18 zoomIn(tabs[1], function () {
19 is(win.gBrowser.selectedTab, tabs[1], "normal tab is selected");
21 // select app tab
22 win.gBrowser.selectedTab = tabs[0];
24 toggleTabView(win, function () {
25 is(win.gBrowser.selectedTab, tabs[0], "app tab is selected");
26 finish();
27 });
28 });
29 }
31 newWindowWithTabView(onShow, onLoad);
32 }
34 // ----------
35 function zoomIn(tab, callback) {
36 whenTabViewIsHidden(function () {
37 executeSoon(callback);
38 }, tab.ownerDocument.defaultView);
40 tab._tabViewTabItem.zoomIn();
41 }
43 // ----------
44 function toggleTabView(win, callback) {
45 showTabView(function () {
46 hideTabView(callback, win);
47 }, win);
48 }