browser/components/tabview/test/browser_tabview_bug681599.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 function test() {
     5   waitForExplicitFinish();
     7   showTabView(function() {
     8     let cw = TabView.getContentWindow();
    10     registerCleanupFunction(function () {
    11       while (gBrowser.tabs.length > 1)
    12         gBrowser.removeTab(gBrowser.tabs[1]);
    13       hideTabView();
    14     })
    16     whenSearchIsEnabled(function() {
    17       ok(cw.Search.isEnabled(), "The search is enabled before creating a new tab");
    19       whenTabViewIsHidden(function() {
    20         showTabView(function() {
    21           ok(!cw.Search.isEnabled(), "The search is disabled when entering Tabview");
    23           hideTabView(finish);
    24         })
    25       });
    26       EventUtils.synthesizeKey("t", { accelKey: true }, cw);
    27     });
    29     EventUtils.synthesizeKey("VK_SLASH", {}, cw);
    30   });
    31 }

mercurial