1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/tabview/test/browser_tabview_bug608158.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +function test() { 1.8 + waitForExplicitFinish(); 1.9 + newWindowWithTabView(onTabViewWindowLoaded); 1.10 +} 1.11 + 1.12 +function onTabViewWindowLoaded(win) { 1.13 + let contentWindow = win.TabView.getContentWindow(); 1.14 + 1.15 + is(contentWindow.GroupItems.groupItems.length, 1, 1.16 + "There is one group item on startup"); 1.17 + is(win.gBrowser.tabs.length, 1, "There is one tab on startup"); 1.18 + let groupItem = contentWindow.GroupItems.groupItems[0]; 1.19 + 1.20 + hideGroupItem(groupItem, function () { 1.21 + hideTabView(() => { 1.22 + is(contentWindow.GroupItems.groupItems.length, 1, 1.23 + "There is still one group item"); 1.24 + isnot(groupItem, contentWindow.GroupItems.groupItems[0], 1.25 + "The initial group item is not the same as the final group item"); 1.26 + is(win.gBrowser.tabs.length, 1, "There is only one tab"); 1.27 + ok(!win.TabView.isVisible(), "Tab View is hidden"); 1.28 + promiseWindowClosed(win).then(finish); 1.29 + }, win); 1.30 + }); 1.31 +}