browser/components/tabview/test/browser_tabview_bug608158.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();
     6   newWindowWithTabView(onTabViewWindowLoaded);
     7 }
     9 function onTabViewWindowLoaded(win) {
    10   let contentWindow = win.TabView.getContentWindow();
    12   is(contentWindow.GroupItems.groupItems.length, 1, 
    13      "There is one group item on startup");
    14   is(win.gBrowser.tabs.length, 1, "There is one tab on startup");
    15   let groupItem = contentWindow.GroupItems.groupItems[0];
    17   hideGroupItem(groupItem, function () {
    18     hideTabView(() => {
    19       is(contentWindow.GroupItems.groupItems.length, 1, 
    20          "There is still one group item");
    21       isnot(groupItem, contentWindow.GroupItems.groupItems[0], 
    22             "The initial group item is not the same as the final group item");
    23       is(win.gBrowser.tabs.length, 1, "There is only one tab");
    24       ok(!win.TabView.isVisible(), "Tab View is hidden");
    25       promiseWindowClosed(win).then(finish);
    26     }, win);
    27   });
    28 }

mercurial