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 newWindowWithTabView(function (win) {
8 let cw = win.TabView.getContentWindow();
10 // turn off zoom animations
11 cw.gPrefBranch.setBoolPref("animate_zoom", false);
13 registerCleanupFunction(function () {
14 cw.gPrefBranch.clearUserPref("animate_zoom");
15 win.close();
16 });
18 let group = cw.GroupItems.groupItems[0];
19 group.setSize(100, 100, true);
21 while (!group.isStacked())
22 win.gBrowser.addTab();
24 waitForFocus(function () {
25 whenGroupIsExpanded(group, function () {
26 ok(win.TabView.isVisible(), "tabview is visible");
27 finish();
28 });
30 let expander = group.$expander[0];
31 EventUtils.synthesizeMouseAtCenter(expander, {}, cw);
32 }, cw);
33 });
34 }
36 // ----------
37 function whenGroupIsExpanded(group, callback) {
38 group.addSubscriber("expanded", function onExpanded() {
39 group.removeSubscriber("expanded", onExpanded);
40 executeSoon(callback);
41 });
42 }