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

Side by Side Diff: chrome/browser/ui/search/instant_test_utils.h

Issue 2691033004: [Local NTP] Add an integration test for the fakebox (Closed)
Patch Set: fix Mac Created 3 years, 10 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 | « no previous file | chrome/browser/ui/search/instant_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void PressEnterAndWaitForNavigation(); 55 void PressEnterAndWaitForNavigation();
56 void PressEnterAndWaitForFrameLoad(); 56 void PressEnterAndWaitForFrameLoad();
57 57
58 bool GetBoolFromJS(content::WebContents* contents, 58 bool GetBoolFromJS(content::WebContents* contents,
59 const std::string& script, 59 const std::string& script,
60 bool* result) WARN_UNUSED_RESULT; 60 bool* result) WARN_UNUSED_RESULT;
61 bool GetIntFromJS(content::WebContents* contents, 61 bool GetIntFromJS(content::WebContents* contents,
62 const std::string& script, 62 const std::string& script,
63 int* result) WARN_UNUSED_RESULT; 63 int* result) WARN_UNUSED_RESULT;
64 bool GetDoubleFromJS(content::WebContents* contents,
65 const std::string& script,
66 double* result) WARN_UNUSED_RESULT;
64 bool GetStringFromJS(content::WebContents* contents, 67 bool GetStringFromJS(content::WebContents* contents,
65 const std::string& script, 68 const std::string& script,
66 std::string* result) WARN_UNUSED_RESULT; 69 std::string* result) WARN_UNUSED_RESULT;
67 70
68 std::string GetOmniboxText(); 71 std::string GetOmniboxText();
69 72
70 // Loads a named image from url |image| from the given |rvh| host. |loaded| 73 // Loads a named image from url |image| from the given |rvh| host. |loaded|
71 // returns whether the image was able to load without error. 74 // returns whether the image was able to load without error.
72 // The method returns true if the JavaScript executed cleanly. 75 // The method returns true if the JavaScript executed cleanly.
73 bool LoadImage(content::RenderViewHost* rvh, 76 bool LoadImage(content::RenderViewHost* rvh,
74 const std::string& image, 77 const std::string& image,
75 bool* loaded); 78 bool* loaded);
76 79
77 private: 80 private:
78 GURL instant_url_; 81 GURL instant_url_;
79 GURL ntp_url_; 82 GURL ntp_url_;
80 83
81 Browser* browser_; 84 Browser* browser_;
82 85
83 // HTTPS Testing server, started on demand. 86 // HTTPS Testing server, started on demand.
84 net::EmbeddedTestServer https_test_server_; 87 net::EmbeddedTestServer https_test_server_;
85 88
86 // Set to true to initialize suggestions URL in default search provider. 89 // Set to true to initialize suggestions URL in default search provider.
87 bool init_suggestions_url_; 90 bool init_suggestions_url_;
88 91
89 DISALLOW_COPY_AND_ASSIGN(InstantTestBase); 92 DISALLOW_COPY_AND_ASSIGN(InstantTestBase);
90 }; 93 };
91 94
92 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ 95 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698