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

Side by Side Diff: chrome/test/data/instant_extended.js

Issue 11592004: InstantExtended: tests! (Closed) Base URL: http://git.chromium.org/chromium/src.git@fixmyterms
Patch Set: Fix lint. Created 7 years, 11 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
(Empty)
1 /**
2 * @fileoverview Embedded Search API implementation for testing.
3 */
4
5 var apiHandle;
6 var onnativesuggestioncalls = 0;
7 var onsubmitcalls = 0;
8
9 function getApiHandle() {
10 if (window.navigator && window.navigator.searchBox)
11 return window.navigator.searchBox;
12 if (window.chrome && window.chrome.searchBox)
13 return window.chrome.searchBox;
14 return null;
15 }
16
17 function handleNativeSuggestions() {
18 console.log('native');
sreeram 2013/01/17 23:54:18 Remove this? (I assume you added it for debugging.
samarth 2013/01/18 00:06:45 Done.
19 onnativesuggestioncalls++;
20 apiHandle.show(2 /* QUERY_SUGGESTIONS */, 300);
21 }
22
23 function handleSubmit() {
24 onsubmitcalls++;
25 }
26
27 function setUp() {
28 apiHandle = getApiHandle();
29 apiHandle.onnativesuggestions = handleNativeSuggestions;
30 apiHandle.onsubmit = handleSubmit;
31 if (apiHandle.value)
32 handleNativeSuggestions();
33 }
34
35 setUp();
OLDNEW
« chrome/test/data/instant_extended.html ('K') | « chrome/test/data/instant_extended.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698