/* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ function test() { waitForExplicitFinish(); newWindowWithTabView(onTabViewWindowLoaded); } let contentWindow = null; function onTabViewWindowLoaded(win) { ok(win.TabView.isVisible(), "Tab View is visible"); contentWindow = win.TabView.getContentWindow(); // Preparation // let numTabs = 10; let groupItem = createGroupItemWithBlankTabs(win, 150, 150, 100, numTabs, false); // Ensure that group is stacked ok(groupItem.isStacked(), "Group item is stacked"); // Force updates to be deferred contentWindow.TabItems.pausePainting(); let children = groupItem.getChildren(); is(children.length, numTabs, "Correct number of tabitems created"); let leftToUpdate = numTabs; let testFunc = function(tabItem) { tabItem.removeSubscriber(tabItem, "updated"); if (--leftToUpdate>0) return; // Now that everything is updated, compare update times. // All tabs in the group should have updated AFTER the first one. let earliest = children[0]._lastTabUpdateTime; for (let c=1; c first item ("+earliest+")"); shutDown(win, groupItem); }; for (let c=0; c