michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: showTabView(function() { michael@0: let cw = TabView.getContentWindow(); michael@0: michael@0: registerCleanupFunction(function () { michael@0: while (gBrowser.tabs.length > 1) michael@0: gBrowser.removeTab(gBrowser.tabs[1]); michael@0: hideTabView(); michael@0: }) michael@0: michael@0: whenSearchIsEnabled(function() { michael@0: ok(cw.Search.isEnabled(), "The search is enabled before creating a new tab"); michael@0: michael@0: whenTabViewIsHidden(function() { michael@0: showTabView(function() { michael@0: ok(!cw.Search.isEnabled(), "The search is disabled when entering Tabview"); michael@0: michael@0: hideTabView(finish); michael@0: }) michael@0: }); michael@0: EventUtils.synthesizeKey("t", { accelKey: true }, cw); michael@0: }); michael@0: michael@0: EventUtils.synthesizeKey("VK_SLASH", {}, cw); michael@0: }); michael@0: }