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

Side by Side Diff: chrome/test/data/instant/search.html

Issue 6310003: Support specified JSON as argument to setSuggestions(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <h1>Instant</h1> 3 <h1>Instant</h1>
4 <div id=log></div> 4 <div id=log></div>
5 <script> 5 <script>
6 window.chrome.sv = true; 6 window.chrome.sv = true;
7 7
8 window.onsubmitcalls = 0; 8 window.onsubmitcalls = 0;
9 window.onchangecalls = 0; 9 window.onchangecalls = 0;
10 window.oncancelcalls = 0; 10 window.oncancelcalls = 0;
11 window.onresizecalls = 0; 11 window.onresizecalls = 0;
12 12
13 var searchBox = window.chrome.searchBox || {}; 13 var searchBox = window.chrome.searchBox || {};
14 14
15 window.beforeLoadSearchBox = {}; 15 window.beforeLoadSearchBox = {};
16 for (var prop in searchBox) window.beforeLoadSearchBox[prop] = searchBox[prop]; 16 for (var prop in searchBox) window.beforeLoadSearchBox[prop] = searchBox[prop];
17 17
18 window.setSuggestionsArgument = ["abcdef"];
sky 2011/01/13 22:37:46 Doesn't this need to be map with suggestions: cont
tonyg 2011/01/13 23:07:50 An array of strings is the old format (which conti
19
18 window.chrome.searchBox.onsubmit = function() { 20 window.chrome.searchBox.onsubmit = function() {
19 searchBox.setSuggestions(["abcdef"]); 21 searchBox.setSuggestions(setSuggestionsArgument);
20 window.onsubmitcalls++; 22 window.onsubmitcalls++;
21 }; 23 };
22 24
23 window.chrome.searchBox.onchange = function() { 25 window.chrome.searchBox.onchange = function() {
24 searchBox.setSuggestions(["abcdef"]); 26 searchBox.setSuggestions(setSuggestionsArgument);
25 window.onchangecalls++; 27 window.onchangecalls++;
26 }; 28 };
27 29
28 window.chrome.searchBox.oncancel = function() { 30 window.chrome.searchBox.oncancel = function() {
29 searchBox.setSuggestions(["abcdef"]); 31 searchBox.setSuggestions(setSuggestionsArgument);
30 window.oncancelcalls++; 32 window.oncancelcalls++;
31 }; 33 };
32 34
33 window.chrome.searchBox.onresize = function() { 35 window.chrome.searchBox.onresize = function() {
34 window.onresizecalls++; 36 window.onresizecalls++;
35 }; 37 };
36 </script> 38 </script>
37 </body> 39 </body>
38 </html> 40 </html>
OLDNEW
« chrome/renderer/searchbox_extension.cc ('K') | « chrome/renderer/searchbox_extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698