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

Unified Diff: chrome/test/data/instant.html

Issue 10836031: Remove Instant v1 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update history, title, favicon Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/searchbox_extension.cc ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/instant.html
diff --git a/chrome/test/data/instant.html b/chrome/test/data/instant.html
index 513a007204c50d99b46bd4ce648172bcf893116d..189d056b58a6bd1149f43a588c3b5bbd0d0507cc 100644
--- a/chrome/test/data/instant.html
+++ b/chrome/test/data/instant.html
@@ -1,50 +1,45 @@
-<html>
-<body>
-<h1>Instant</h1>
-<script>
-window.chrome.sv = true;
-
-window.onsubmitcalls = 0;
-window.onchangecalls = 0;
-window.oncancelcalls = 0;
-window.onresizecalls = 0;
-
-Object.prototype.clone = function() {
- var copy = {};
- for (var prop in this) copy[prop] = this[prop];
- return copy;
+<html><body><h1>Instant</h1><script>
+
+var onchangecalls = 0;
+var onsubmitcalls = 0;
+var oncancelcalls = 0;
+var onresizecalls = 0;
+
+var value = "";
+var verbatim = false;
+var height = 0;
+
+var suggestion = [ { value: "query suggestion" } ];
+var behavior = "now";
+
+chrome.searchBox.onchange = function() {
+ onchangecalls++;
+ value = chrome.searchBox.value;
+ verbatim = chrome.searchBox.verbatim;
+ chrome.searchBox.setSuggestions({
+ suggestions: suggestion,
+ complete_behavior: behavior
+ });
};
-window.beforeLoadSearchBox = window.chrome.searchBox.clone();
-window.lastSearchBox = window.chrome.searchBox.clone();
-
-window.setSuggestionsArgument = {
- suggestions: [
- { value: "defghi" }
- ]
+chrome.searchBox.onsubmit = function() {
+ onsubmitcalls++;
+ value = chrome.searchBox.value;
+ verbatim = chrome.searchBox.verbatim;
};
-window.chrome.searchBox.onsubmit = function() {
- window.chrome.searchBox.setSuggestions(setSuggestionsArgument);
- window.lastSearchBox = window.chrome.searchBox.clone();
- window.onsubmitcalls++;
+chrome.searchBox.oncancel = function() {
+ oncancelcalls++;
+ value = chrome.searchBox.value;
+ verbatim = chrome.searchBox.verbatim;
};
-window.chrome.searchBox.onchange = function() {
- window.chrome.searchBox.setSuggestions(setSuggestionsArgument);
- window.lastSearchBox = window.chrome.searchBox.clone();
- window.onchangecalls++;
+chrome.searchBox.onresize = function() {
+ onresizecalls++;
+ height = chrome.searchBox.height;
};
-window.chrome.searchBox.oncancel = function() {
- window.chrome.searchBox.setSuggestions(setSuggestionsArgument);
- window.lastSearchBox = window.chrome.searchBox.clone();
- window.oncancelcalls++;
-};
+if (chrome.searchBox.value != "")
+ chrome.searchBox.onchange();
-window.chrome.searchBox.onresize = function() {
- window.onresizecalls++;
-};
-</script>
-</body>
-</html>
+</script></body></html>
« no previous file with comments | « chrome/renderer/searchbox_extension.cc ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698