browser/components/tabview/test/browser_tabview_bug608153.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 function test() {
     5   waitForExplicitFinish();
     7   let pinnedTab = gBrowser.addTab();
     8   gBrowser.pinTab(pinnedTab);
    10   registerCleanupFunction(function() {
    11     gBrowser.unpinTab(pinnedTab);
    13     // Don't remove the initial tab.
    14     gBrowser.moveTabTo(gBrowser.tabs[1], 0);
    16     while (gBrowser.tabs[1])
    17       gBrowser.removeTab(gBrowser.tabs[1]);
    18     hideTabView();
    19   });
    21   showTabView(function() {
    22     let cw = TabView.getContentWindow();
    23     let groupItemOne = cw.GroupItems.groupItems[0];
    24     let groupItemTwo = createGroupItemWithBlankTabs(window, 250, 250, 40, 1);
    26     is(cw.GroupItems.groupItems.length, 2, "Two group items");
    28     hideTabView(function() {
    29       gBrowser.selectedTab = pinnedTab;
    30       is(cw.GroupItems.getActiveGroupItem(), groupItemTwo, "Group two is active");
    31       is(gBrowser.selectedTab, pinnedTab, "Selected tab is the pinned tab");
    33       goToNextGroup();
    34       is(cw.GroupItems.getActiveGroupItem(), groupItemOne, "Group one is active");
    35       is(gBrowser.selectedTab, pinnedTab, "Selected tab is the pinned tab");
    37       finish();
    38     });
    39   });
    40 }

mercurial