browser/components/tabview/test/browser_tabview_bug633788.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.

michael@0 1 /* Any copyright is dedicated to the Public Domain.
michael@0 2 http://creativecommons.org/publicdomain/zero/1.0/ */
michael@0 3
michael@0 4 function test() {
michael@0 5 waitForExplicitFinish();
michael@0 6
michael@0 7 newWindowWithTabView(win => {
michael@0 8 is(win.gBrowser.tabs.length, 1, "There is only one tab");
michael@0 9
michael@0 10 let tab = win.gBrowser.tabs[0];
michael@0 11 let tabItem = tab._tabViewTabItem;
michael@0 12 ok(tabItem.parent, "The tab item belongs to a group");
michael@0 13 let groupId = tabItem.parent.id;
michael@0 14
michael@0 15 tab._tabViewTabItem.close();
michael@0 16
michael@0 17 whenTabViewIsHidden(function() {
michael@0 18 // a new tab with group should be opened
michael@0 19 is(win.gBrowser.tabs.length, 1, "There is still one tab");
michael@0 20 isnot(win.gBrowser.selectedTab, tab, "The tab is different");
michael@0 21
michael@0 22 tab = win.gBrowser.tabs[0];
michael@0 23 tabItem = tab._tabViewTabItem;
michael@0 24 ok(tabItem.parent, "This new tab item belongs to a group");
michael@0 25
michael@0 26 is(tabItem.parent.id, groupId, "The group is different");
michael@0 27
michael@0 28 promiseWindowClosed(win).then(finish);
michael@0 29 }, win);
michael@0 30 });
michael@0 31 }

mercurial