| Index: chrome/test/data/instant_extended.html
|
| diff --git a/chrome/test/data/instant_extended.html b/chrome/test/data/instant_extended.html
|
| index 96c2541b5528f4e9a0c5587c3428c669a2e5cdb9..413d5c86db2aa9de247d535a86fab8e317611878 100644
|
| --- a/chrome/test/data/instant_extended.html
|
| +++ b/chrome/test/data/instant_extended.html
|
| @@ -49,21 +49,29 @@ function previousSuggestion() {
|
| if (suggestionIndex != -1) {
|
| suggestionIndex--;
|
| if (suggestionIndex == -1) {
|
| - apiHandle.setValue(savedUserText);
|
| + resetSuggestion();
|
| } else {
|
| apiHandle.setValue(suggestions[suggestionIndex]);
|
| }
|
| }
|
| }
|
|
|
| +function resetSuggestion() {
|
| + apiHandle.setValue(savedUserText);
|
| + suggestionIndex = -1;
|
| +}
|
| +
|
| function handleKeyPress(event) {
|
| var VKEY_UP = 0x26;
|
| var VKEY_DOWN = 0x28;
|
| + var VKEY_ESCAPE = 0x1B;
|
|
|
| if (event.keyCode == VKEY_DOWN) {
|
| nextSuggestion();
|
| } else if (event.keyCode == VKEY_UP) {
|
| previousSuggestion();
|
| + } else if (event.keyCode == VKEY_ESCAPE) {
|
| + resetSuggestion();
|
| }
|
| }
|
|
|
|
|