browser/components/tabview/test/browser_tabview_bug681599.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/tabview/test/browser_tabview_bug681599.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +function test() {
     1.8 +  waitForExplicitFinish();
     1.9 +
    1.10 +  showTabView(function() {
    1.11 +    let cw = TabView.getContentWindow();
    1.12 +
    1.13 +    registerCleanupFunction(function () {
    1.14 +      while (gBrowser.tabs.length > 1)
    1.15 +        gBrowser.removeTab(gBrowser.tabs[1]);
    1.16 +      hideTabView();
    1.17 +    })
    1.18 +
    1.19 +    whenSearchIsEnabled(function() {
    1.20 +      ok(cw.Search.isEnabled(), "The search is enabled before creating a new tab");
    1.21 +
    1.22 +      whenTabViewIsHidden(function() {
    1.23 +        showTabView(function() {
    1.24 +          ok(!cw.Search.isEnabled(), "The search is disabled when entering Tabview");
    1.25 +
    1.26 +          hideTabView(finish);
    1.27 +        })
    1.28 +      });
    1.29 +      EventUtils.synthesizeKey("t", { accelKey: true }, cw);
    1.30 +    });
    1.31 +
    1.32 +    EventUtils.synthesizeKey("VK_SLASH", {}, cw);
    1.33 +  });
    1.34 +}

mercurial