michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: let compareCanvasSize = function (prefix, width, height, tabItem) { michael@0: let canvas = tabItem.$canvas[0]; michael@0: is(canvas.width, width, prefix + ": canvas widths are equal (" + width + "px)"); michael@0: is(canvas.height, height, prefix + ": canvas heights are equal (" + height + "px)"); michael@0: }; michael@0: michael@0: newWindowWithTabView(function (win) { michael@0: registerCleanupFunction(function () win.close()); michael@0: michael@0: let cw = win.TabView.getContentWindow(); michael@0: let groupItem = cw.GroupItems.groupItems[0]; michael@0: let tabItem = groupItem.getChild(0); michael@0: michael@0: afterAllTabItemsUpdated(function () { michael@0: let {width, height} = tabItem.$canvas[0]; michael@0: michael@0: hideGroupItem(groupItem, function () { michael@0: compareCanvasSize("hidden", width, height, tabItem); michael@0: michael@0: unhideGroupItem(groupItem, function () { michael@0: compareCanvasSize("unhidden", width, height, tabItem); michael@0: finish(); michael@0: }); michael@0: }); michael@0: }, win); michael@0: }); michael@0: }