diff -r 000000000000 -r 6474c204b198 browser/base/content/test/general/browser_bug655584.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/base/content/test/general/browser_bug655584.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,23 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +// Bug 655584 - awesomebar suggestions don't update after tab is closed + +function test() { + var tab1 = gBrowser.addTab(); + var tab2 = gBrowser.addTab(); + + // When urlbar in a new tab is focused, and a tab switch occurs, + // the urlbar popup should be closed + gBrowser.selectedTab = tab2; + gURLBar.focus(); // focus the urlbar in the tab we will switch to + gBrowser.selectedTab = tab1; + gURLBar.openPopup(); + gBrowser.selectedTab = tab2; + ok(!gURLBar.popupOpen, "urlbar focused in tab to switch to, close popup"); + + // cleanup + gBrowser.removeCurrentTab(); + gBrowser.removeCurrentTab(); +}