browser/components/tabview/test/browser_tabview_bug665502.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 function test() {
     5   waitForExplicitFinish();
     7   let onLoad = function (win) {
     8     for (let i = 0; i < 2; i++)
     9       win.gBrowser.addTab();
    10   };
    12   let onShow = function (win) {
    13     registerCleanupFunction(function () win.close());
    15     let cw = win.TabView.getContentWindow();
    16     let groupItem = cw.GroupItems.groupItems[0];
    18     groupItem.setSize(400, 200, true);
    20     let tabItem = groupItem.getChild(0);
    21     let bounds = tabItem.getBounds();
    23     is(groupItem.getActiveTab(), tabItem, "the first tab is active");
    24     EventUtils.synthesizeMouseAtCenter(tabItem.container, {button: 1}, cw);
    26     is(groupItem.getChildren().indexOf(tabItem), -1, "tabItem got removed");
    27     ok(bounds.equals(groupItem.getChild(0).getBounds()), "tabItem bounds didn't change");
    29     finish();
    30   };
    32   newWindowWithTabView(onShow, onLoad);
    33 }

mercurial