browser/components/tabview/test/browser_tabview_bug625955.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/tabview/test/browser_tabview_bug625955.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     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 +  showTabView(onTabViewShown);
    1.10 +}
    1.11 +
    1.12 +function onTabViewShown() {
    1.13 +  let contentWindow = TabView.getContentWindow();
    1.14 +  is(contentWindow.GroupItems.groupItems.length, 1, "Has one groupItem only");
    1.15 +
    1.16 +  let groupItem = contentWindow.GroupItems.groupItems[0];
    1.17 +  let tabItems = groupItem.getChildren();
    1.18 +  is(tabItems.length, 1, "There is only one tabItems in the groupItem");
    1.19 +
    1.20 +  let bounds = groupItem.bounds;
    1.21 +  gBrowser.addTab();
    1.22 +  gBrowser.removeTab(gBrowser.tabs[1]);
    1.23 +  ok(bounds.equals(groupItem.bounds), 'Group bounds recovered'); 
    1.24 +
    1.25 +  is(tabItems.length, 1, "There is only one tabItem in the groupItem");
    1.26 +
    1.27 +  hideTabView(finish);
    1.28 +}

mercurial