Bug 1343174 - Part 3 - Test that selectOrAddTab() finds zombified tabs as well. r=ahunt

MozReview-Commit-ID: AXeAgRltRP1

--HG--
extra : rebase_source : 2c1b3bd951b04b605368d6b4caa67a22ecd0e9c4
This commit is contained in:
Jan Henning 2017-02-28 20:55:29 +01:00
parent f05b95948c
commit 51cfb79ec0

View File

@ -86,6 +86,27 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1216047
// Check that basic_article is now selected
is(BrowserApp.selectedTab, tabTest, "Target tab is selected.");
// Switch back to about:blank
BrowserApp.selectTab(tabBlank);
yield promiseTabEvent(BrowserApp.deck, "TabSelect");
// Check that about:blank is selected
is(BrowserApp.selectedTab, tabBlank, "about:blank is selected.");
// Zombify basic_article
tabTest.zombify();
// Check that basic_article is actually zombified
ok(tabTest.browser.__SS_restore, "Target tab is set for delay loading.");
is(tabTest.browser.currentURI.spec, "about:blank", "Target tab is zombified.");
// Use selectOrAddTab to select the existing tab
BrowserApp.selectOrAddTab(kTestPage, { selected: true, parentId: BrowserApp.selectedTab.id });
yield promiseTabEvent(BrowserApp.deck, "TabSelect");
// Check that basic_article is now selected
is(BrowserApp.selectedTab, tabTest, "Target tab is selected.");
cleanupTabs();
});