Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: chrome/test/data/extensions/api_test/omnibox/test.html

Issue 7307033: Fix a regression where the omnibox would re-enter extension keyword mode after (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final comment Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_omnibox_apitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 chrome.omnibox.onInputChanged.addListener( 2 chrome.omnibox.onInputChanged.addListener(
3 function(text, suggest) { 3 function(text, suggest) {
4 chrome.test.log("onInputChanged: " + text); 4 chrome.test.log("onInputChanged: " + text);
5 if (text != "suggestio") 5 if (text == "suggestio") {
6 return; 6 // First test, complete "suggestio"
7 7 var desc = 'Description with style: <match>&lt;match&gt;</match>, ' +
8 var desc = 'Description with style: <match>&lt;match&gt;</match>, ' + 8 '<dim>[dim]</dim>, <url>(url till end)</url>';
9 '<dim>[dim]</dim>, <url>(url till end)</url>'; 9 suggest([
10 suggest([ 10 {content: text + "n1", description: desc},
11 { 11 {content: text + "n2", description: "description2"},
12 content: text + "n1", 12 {content: text + "n3", description: "description3"},
13 description: desc 13 ]);
14 }, 14 } else {
15 {content: text + "n2", description: "description2"}, 15 // Other tests, just provide a simple suggestion.
16 {content: text + "n3", description: "description3"}, 16 suggest([{content: text + " 1", description: "description"}]);
17 ]); 17 }
18 }); 18 });
19 19
20 chrome.omnibox.onInputEntered.addListener( 20 chrome.omnibox.onInputEntered.addListener(
21 function(text) { 21 function(text) {
22 chrome.test.assertEq("command", text); 22 chrome.test.assertEq("command", text);
23 chrome.test.notifyPass(); 23 chrome.test.notifyPass();
24 }); 24 });
25 25
26 // Now we wait for the input events to fire. 26 // Now we wait for the input events to fire.
27 chrome.test.notifyPass(); 27 chrome.test.notifyPass();
28 </script> 28 </script>
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_omnibox_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698