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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/instant_extended.html
diff --git a/chrome/test/data/instant_extended.html b/chrome/test/data/instant_extended.html
new file mode 100644
index 0000000000000000000000000000000000000000..f6f59026b23c339cd253e465dff8a945d1f78678
--- /dev/null
+++ b/chrome/test/data/instant_extended.html
@@ -0,0 +1,41 @@
+<html>
+ <head>
+ <script>
+
+var apiHandle;
+var onnativesuggestioncalls = 0;
+var onsubmitcalls = 0;
+
+function getApiHandle() {
+ if (window.navigator && window.navigator.searchBox)
+ return window.navigator.searchBox;
+ if (window.chrome && window.chrome.searchBox)
+ return window.chrome.searchBox;
+ return null;
+}
+
+function handleNativeSuggestions() {
+ onnativesuggestioncalls++;
+ apiHandle.show(2 /* QUERY_SUGGESTIONS */, 300);
+}
+
+function handleSubmit() {
+ onsubmitcalls++;
+}
+
+function setUp() {
+ apiHandle = getApiHandle();
+ apiHandle.onnativesuggestions = handleNativeSuggestions;
+ apiHandle.onsubmit = handleSubmit;
+ if (apiHandle.value)
+ handleNativeSuggestions();
+}
+
+setUp();
+
+ </script>
+ </head>
+ <body>
+ <h1>Instant</h1>
+ </body>
+</html>
« 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