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

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

Issue 11592004: InstantExtended: tests! (Closed) Base URL: http://git.chromium.org/chromium/src.git@fixmyterms
Patch Set: Add cc file for instant_test_utils 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
« no previous file with comments | « chrome/chrome_tests.gypi ('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
(Empty)
1 <html>
2 <head>
3 <script>
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 onnativesuggestioncalls++;
19 apiHandle.show(2 /* QUERY_SUGGESTIONS */, 300);
20 }
21
22 function handleSubmit() {
23 onsubmitcalls++;
24 }
25
26 function setUp() {
27 apiHandle = getApiHandle();
28 apiHandle.onnativesuggestions = handleNativeSuggestions;
29 apiHandle.onsubmit = handleSubmit;
30 if (apiHandle.value)
31 handleNativeSuggestions();
32 }
33
34 setUp();
35
36 </script>
37 </head>
38 <body>
39 <h1>Instant</h1>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698