Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
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 }