browser/base/content/test/general/browser_bug655584.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/base/content/test/general/browser_bug655584.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 + * http://creativecommons.org/publicdomain/zero/1.0/
     1.6 + */
     1.7 +
     1.8 +// Bug 655584 - awesomebar suggestions don't update after tab is closed
     1.9 +
    1.10 +function test() {
    1.11 +  var tab1 = gBrowser.addTab();
    1.12 +  var tab2 = gBrowser.addTab();
    1.13 +
    1.14 +  // When urlbar in a new tab is focused, and a tab switch occurs,
    1.15 +  // the urlbar popup should be closed
    1.16 +  gBrowser.selectedTab = tab2;
    1.17 +  gURLBar.focus(); // focus the urlbar in the tab we will switch to
    1.18 +  gBrowser.selectedTab = tab1;
    1.19 +  gURLBar.openPopup();
    1.20 +  gBrowser.selectedTab = tab2;
    1.21 +  ok(!gURLBar.popupOpen, "urlbar focused in tab to switch to, close popup");
    1.22 +  
    1.23 +  // cleanup
    1.24 +  gBrowser.removeCurrentTab();
    1.25 +  gBrowser.removeCurrentTab();
    1.26 +}

mercurial