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

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

Issue 2485004: Attempt to fix flaky OmniboxApiTest.Basic. (Closed)
Patch Set: Created 10 years, 6 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
OLDNEW
1 <script> 1 <script>
2 if (!chrome.omnibox) { 2 if (!chrome.omnibox) {
3 chrome.omnibox = chrome.experimental.omnibox; 3 chrome.omnibox = chrome.experimental.omnibox;
4 } 4 }
5 5
6 chrome.experimental.omnibox.onInputChanged.addListener( 6 chrome.omnibox.onInputChanged.addListener(
7 function(text, suggest) { 7 function(text, suggest) {
8 suggest([ 8 suggest([
9 {content: text + "n1", description: "description1"}, 9 {content: text + "n1", description: "description1"},
10 {content: text + "n2", description: "description2"}, 10 {content: text + "n2", description: "description2"},
11 {content: text + "n3", description: "description3"} 11 {content: text + "n3", description: "description3"}
12 ]); 12 ]);
13 }); 13 });
14 14
15 chrome.experimental.omnibox.onInputEntered.addListener( 15 chrome.omnibox.onInputEntered.addListener(
16 function(text) { 16 function(text) {
17 chrome.test.assertEq("command", text); 17 chrome.test.assertEq("command", text);
18 chrome.test.notifyPass(); 18 chrome.test.notifyPass();
19 }); 19 });
20 20
21 // Now we wait for the input events to fire. 21 // Now we wait for the input events to fire.
22 chrome.test.notifyPass(); 22 chrome.test.notifyPass();
23 </script> 23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698