browser/components/tabview/test/browser_tabview_bug681599.js

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

mercurial