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 let numChildren = 7;
7 let assertTopOfStack = function (tabItem) {
8 ok(!tabItem.getHidden(), "tabItem is visible");
9 is(tabItem.zIndex, tabItem.parent.getZ() + numChildren + 1, "zIndex");
10 }
12 let testTopOfStack = function (tabItem, callback) {
13 hideTabView(function () {
14 gBrowser.selectedTab = tabItem.tab;
16 showTabView(function () {
17 assertTopOfStack(tabItem);
18 callback();
19 });
20 });
21 }
23 let finishTest = function () {
24 registerCleanupFunction(function () {
25 is(1, gBrowser.tabs.length, "there is one tab, only");
26 ok(!TabView.isVisible(), "tabview is not visible");
27 });
29 finish();
30 }
32 waitForExplicitFinish();
34 showTabView(function () {
35 let groupItem = createGroupItemWithBlankTabs(window, 150, 150, 10, numChildren);
37 registerCleanupFunction(function () {
38 closeGroupItem(groupItem, function () TabView.hide());
39 });
41 testTopOfStack(groupItem.getChild(1), function () {
42 testTopOfStack(groupItem.getChild(6), function () {
43 closeGroupItem(groupItem, function () {
44 hideTabView(finishTest);
45 });
46 });
47 });
48 });
49 }