diff options
author | jered@chromium.org <jered@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-22 01:53:41 +0000 |
---|---|---|
committer | jered@chromium.org <jered@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-22 01:53:41 +0000 |
commit | 57a13a73391ae4e6cef2afcc89d0bbb085836675 (patch) | |
tree | a1af321c17e24064d4c7ac47a64dbd225f9e5f49 /chrome/test/data | |
parent | d455701e3f7bd69609202765151fe1c592bd4019 (diff) | |
download | chromium_src-57a13a73391ae4e6cef2afcc89d0bbb085836675.zip chromium_src-57a13a73391ae4e6cef2afcc89d0bbb085836675.tar.gz chromium_src-57a13a73391ae4e6cef2afcc89d0bbb085836675.tar.bz2 |
InstantExtended: Allow setting URL in verbatim.
Previously, InstantController prevented setting URL suggestions in
verbatim mode to avoid showing blue text while a user is backspacing.
This doesn't work for the case of backspacing from a query to an URL.
Instead, when the page tries to set a URL suggestion in verbatim
mode, attempt to set the exact omnibox text as the suggested text
(subject to all the other checks on suggested text).
This permits the page to say "hey, this is a URL again".
BUG=176623
TEST=Try typing some urls and suffixes and backspacing. You should never
see blue autocompletion while backspacing. However, until server side
fixes are in, you still may not be able to backspace from a query to an
url suggestion properly.
R=sreeram@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12327014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r-- | chrome/test/data/instant_extended.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/test/data/instant_extended.html b/chrome/test/data/instant_extended.html index ecdb303..7f3bdae 100644 --- a/chrome/test/data/instant_extended.html +++ b/chrome/test/data/instant_extended.html @@ -9,6 +9,7 @@ var savedUserText = null; var suggestionIndex = -1; var suggestions = ["result 1", "result 2", "result 3"]; var suggestion; +var behavior = 2; function getApiHandle() { if (window.navigator && window.navigator.embeddedSearch && @@ -34,7 +35,7 @@ function handleOnChange() { savedUserText = apiHandle.value; suggestionIndex = -1; if (suggestion) { - apiHandle.setAutocompleteText(suggestion, 2); + apiHandle.setAutocompleteText(suggestion, behavior); // Ensure this is only called once for this suggestion. suggestion = null; } |