browser/components/tabview/test/browser_tabview_bug705621.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_bug705621.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     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 +
    1.10 +  newWindowWithTabView(function(win) {
    1.11 +    registerCleanupFunction(function() {
    1.12 +      win.close();
    1.13 +    });
    1.14 +
    1.15 +    let cw = win.TabView.getContentWindow();
    1.16 +
    1.17 +    let groupItemOne = cw.GroupItems.groupItems[0];
    1.18 +    is(groupItemOne.getChildren().length, 1, "Group one has 1 tab item");
    1.19 +
    1.20 +    let groupItemTwo = createGroupItemWithBlankTabs(win, 300, 300, 40, 1);
    1.21 +    is(groupItemTwo.getChildren().length, 1, "Group two has 1 tab item");
    1.22 +
    1.23 +    whenTabViewIsHidden(function() {
    1.24 +      executeSoon(function() { 
    1.25 +        win.gBrowser.removeTab(win.gBrowser.selectedTab);
    1.26 +        is(cw.UI.getActiveTab(), groupItemOne.getChild(0), "TabItem in Group one is selected");
    1.27 +        finish();
    1.28 +      });
    1.29 +    }, win);
    1.30 +    groupItemTwo.getChild(0).zoomIn();
    1.31 +  });
    1.32 +}
    1.33 +

mercurial