Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 function test() {
5 waitForExplicitFinish();
7 let compareCanvasSize = function (prefix, width, height, tabItem) {
8 let canvas = tabItem.$canvas[0];
9 is(canvas.width, width, prefix + ": canvas widths are equal (" + width + "px)");
10 is(canvas.height, height, prefix + ": canvas heights are equal (" + height + "px)");
11 };
13 newWindowWithTabView(function (win) {
14 registerCleanupFunction(function () win.close());
16 let cw = win.TabView.getContentWindow();
17 let groupItem = cw.GroupItems.groupItems[0];
18 let tabItem = groupItem.getChild(0);
20 afterAllTabItemsUpdated(function () {
21 let {width, height} = tabItem.$canvas[0];
23 hideGroupItem(groupItem, function () {
24 compareCanvasSize("hidden", width, height, tabItem);
26 unhideGroupItem(groupItem, function () {
27 compareCanvasSize("unhidden", width, height, tabItem);
28 finish();
29 });
30 });
31 }, win);
32 });
33 }