| OLD | NEW |
| 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> |
| OLD | NEW |