B2G/gecko/browser/components/tabview/test/browser_tabview_bug595943.js
// Click into one of the tabs, close it and make sure we don't go back to Tab View.
Click into one of the tabs, close it and make sure we don't go back to Tab View.
Click into one of the tabs close it and make sure we don ' t go back to Tab View .
function onTabViewHidden() {
    window.removeEventListener("tabviewhidden", onTabViewHidden, false);
    ok(!TabView.isVisible(), "Tab View is hidden because we clicked on the app tab");
    gBrowser.removeTab(normalXulTab);  
    ok(!TabView.isVisible(), "Tab View remains hidden");
    gBrowser.selectedTab = originalTab;
    gBrowser.unpinTab(appXulTab);
    gBrowser.removeTab(appXulTab);
    ok(groupItem.closeIfEmpty(), "the second group was empty");
    is(gBrowser.tabs.length, 1, "we finish with one tab");
    is(contentWindow.GroupItems.groupItems.length, 1,
       "we finish with one group");
    ok(!TabView.isVisible(), "we finish with Tab View hidden");
    finish();
  }
function onTabViewHidden ( ) { window . removeEventListener ( "tabviewhidden" , onTabViewHidden , false ) ; ok ( ! TabView . isVisible ( ) , "Tab View is hidden because we clicked on the app tab" ) ; gBrowser . removeTab ( normalXulTab ) ; ok ( ! TabView . isVisible ( ) , "Tab View remains hidden" ) ; gBrowser . selectedTab = originalTab ; gBrowser . unpinTab ( appXulTab ) ; gBrowser . removeTab ( appXulTab ) ; ok ( groupItem . closeIfEmpty ( ) , "the second group was empty" ) ; is ( gBrowser . tabs . length , 1 , "we finish with one tab" ) ; is ( contentWindow . GroupItems . groupItems . length , 1 , "we finish with one group" ) ; ok ( ! TabView . isVisible ( ) , "we finish with Tab View hidden" ) ; finish ( ) ; }
Click into one of the tabs, close it and make sure we don't go back to Tab View.
Click into one of the tabs close it and make sure we don ' t go back to Tab View .
// Remove the tab we're looking at. // Make sure we haven't returned to TabView; this is the crux of this test // clean up // Verify ending state