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();
6 newWindowWithTabView(testTopOfStack, loadTabs);
7 }
9 function loadTabs (win) {
10 for (let i = 0; i < 4; i++)
11 win.gBrowser.loadOneTab('about:blank', {inBackground: false});
12 win.gBrowser.selectedTab = win.gBrowser.tabs[2];
13 }
15 function testTopOfStack(win) {
16 registerCleanupFunction(function () { win.close(); });
17 let cw = win.TabView.getContentWindow();
18 let groupItem = cw.GroupItems.getActiveGroupItem();
19 ok(!groupItem.isStacked(), 'groupItem is not stacked');
20 groupItem.setSize(150, 150);
21 groupItem.setUserSize();
22 ok(groupItem.isStacked(), 'groupItem is now stacked');
23 ok(groupItem.isTopOfStack(groupItem.getChild(2)),
24 'the third tab is on top of stack');
25 finish();
26 }