diff options
author | jeremycho@chromium.org <jeremycho@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 00:28:08 +0000 |
---|---|---|
committer | jeremycho@chromium.org <jeremycho@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 00:28:08 +0000 |
commit | 3473ae0b1c61b56164c960b030174b0ab7904e74 (patch) | |
tree | a52be99c389538d036cb7e3714fcbd6aa9c13c99 /chrome/test/data/instant_extended.html | |
parent | 1612015462fa13cc354b42b84b51b63c12ee8a04 (diff) | |
download | chromium_src-3473ae0b1c61b56164c960b030174b0ab7904e74.zip chromium_src-3473ae0b1c61b56164c960b030174b0ab7904e74.tar.gz chromium_src-3473ae0b1c61b56164c960b030174b0ab7904e74.tar.bz2 |
Handle key sequence for toggling voice search. This is a no-op until ontogglevoicesearch is added server-side.
This will be used in lieu of the current server-side implementation of this keyboard shortcut to handle cases where Chrome is capturing keystrokes (see internal bug b/9123020). In the future, we may also use this API to initiate voice search from an icon in the omnibox.
BUG=230417
Review URL: https://chromiumcodereview.appspot.com/15721006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204677 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/instant_extended.html')
-rw-r--r-- | chrome/test/data/instant_extended.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/test/data/instant_extended.html b/chrome/test/data/instant_extended.html index 151485f..acff3da 100644 --- a/chrome/test/data/instant_extended.html +++ b/chrome/test/data/instant_extended.html @@ -18,6 +18,7 @@ var onChangeCalls = 0; var submitCount = 0; var onEscKeyPressedCalls = 0; var onFocusChangedCalls = 0; +var onToggleVoiceSearchCalls = 0; var isFocused = false; var onvisibilitycalls = 0; @@ -112,6 +113,10 @@ function handleFocusChange() { isFocused = apiHandle.isFocused; } +function handleToggleVoiceSearch() { + onToggleVoiceSearchCalls++; +} + function setUp() { apiHandle = getApiHandle(); if (!apiHandle) @@ -123,6 +128,7 @@ function setUp() { apiHandle.onchange = handleOnChange; apiHandle.onkeypress = handleKeyPress; apiHandle.onfocuschange = handleFocusChange; + apiHandle.ontogglevoicesearch = handleToggleVoiceSearch; newTabPageHandle.onmostvisitedchange = handleMostVisitedChange; if (apiHandle.value) { handleNativeSuggestions(); |