browser/components/tabview/test/browser_tabview_bug597360.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   newWindowWithTabView(function (win) {
     8     registerCleanupFunction(function () win.close());
    10     let cw = win.TabView.getContentWindow();
    11     let groupItems = cw.GroupItems.groupItems;
    12     let groupItem = groupItems[0];
    14     is(groupItems.length, 1, "There is one group item on startup");
    16     whenTabViewIsHidden(function () {
    17       is(groupItems.length, 1, "There is still one group item");
    18       isnot(groupItem.id, groupItems[0].id, 
    19             "The initial group item is not the same as the final group item");
    20       is(win.gBrowser.tabs.length, 1, "There is only one tab");
    22       finish();
    23     }, win);
    25     hideGroupItem(groupItem, function () {
    26       // create a new tab
    27       EventUtils.synthesizeKey("t", { accelKey: true }, cw);
    28     });
    29   });
    30 }

mercurial