Index: chrome/browser/ui/search/instant_uitest_base.h |
diff --git a/chrome/browser/ui/search/instant_test_utils.h b/chrome/browser/ui/search/instant_uitest_base.h |
similarity index 28% |
copy from chrome/browser/ui/search/instant_test_utils.h |
copy to chrome/browser/ui/search/instant_uitest_base.h |
index 0d5f678b62c8e0a873122a37dab7fc666fb6b08b..6d9e9786c1cf60bda9cd2a22fe9111bcb4b02b8e 100644 |
--- a/chrome/browser/ui/search/instant_test_utils.h |
+++ b/chrome/browser/ui/search/instant_uitest_base.h |
@@ -2,48 +2,29 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ |
-#define CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ |
+#ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_UITEST_BASE_H_ |
+#define CHROME_BROWSER_UI_SEARCH_INSTANT_UITEST_BASE_H_ |
#include <string> |
#include "base/macros.h" |
-#include "chrome/browser/ui/browser.h" |
-#include "chrome/browser/ui/browser_instant_controller.h" |
-#include "chrome/browser/ui/browser_window.h" |
-#include "chrome/browser/ui/location_bar/location_bar.h" |
-#include "chrome/browser/ui/search/instant_controller.h" |
-#include "content/public/test/browser_test_utils.h" |
-#include "net/test/embedded_test_server/embedded_test_server.h" |
-#include "url/gurl.h" |
+#include "chrome/browser/ui/search/instant_test_base.h" |
class OmniboxView; |
+namespace content { |
+class RenderViewHost; |
+} // namespace content |
+ |
// This utility class is meant to be used in a "mix-in" fashion, giving the |
-// derived test class additional Instant-related functionality. |
-class InstantTestBase { |
+// derived test class additional Instant-related UI test functionality. |
+class InstantUITestBase : public InstantTestBase { |
protected: |
- InstantTestBase(); |
- virtual ~InstantTestBase(); |
+ InstantUITestBase(); |
+ ~InstantUITestBase() override; |
protected: |
- void SetupInstant(Browser* browser); |
- void Init(const GURL& instant_url, const GURL& ntp_url, |
- bool init_suggestions_url); |
- |
- void set_browser(Browser* browser) { |
- browser_ = browser; |
- } |
- |
- OmniboxView* omnibox() { |
- return browser_->window()->GetLocationBar()->GetOmniboxView(); |
- } |
- |
- const GURL& instant_url() const { return instant_url_; } |
- |
- const GURL& ntp_url() const { return ntp_url_; } |
- |
- net::EmbeddedTestServer& https_test_server() { return https_test_server_; } |
+ OmniboxView* omnibox(); |
void FocusOmnibox(); |
@@ -52,19 +33,6 @@ class InstantTestBase { |
void PressEnterAndWaitForNavigation(); |
void PressEnterAndWaitForFrameLoad(); |
- bool GetBoolFromJS(const content::ToRenderFrameHost& adapter, |
- const std::string& script, |
- bool* result) WARN_UNUSED_RESULT; |
- bool GetIntFromJS(const content::ToRenderFrameHost& adapter, |
- const std::string& script, |
- int* result) WARN_UNUSED_RESULT; |
- bool GetDoubleFromJS(const content::ToRenderFrameHost& adapter, |
- const std::string& script, |
- double* result) WARN_UNUSED_RESULT; |
- bool GetStringFromJS(const content::ToRenderFrameHost& adapter, |
- const std::string& script, |
- std::string* result) WARN_UNUSED_RESULT; |
- |
std::string GetOmniboxText(); |
// Loads a named image from url |image| from the given |rvh| host. |loaded| |
@@ -75,18 +43,7 @@ class InstantTestBase { |
bool* loaded); |
private: |
- GURL instant_url_; |
- GURL ntp_url_; |
- |
- Browser* browser_; |
- |
- // HTTPS Testing server, started on demand. |
- net::EmbeddedTestServer https_test_server_; |
- |
- // Set to true to initialize suggestions URL in default search provider. |
- bool init_suggestions_url_; |
- |
- DISALLOW_COPY_AND_ASSIGN(InstantTestBase); |
+ DISALLOW_COPY_AND_ASSIGN(InstantUITestBase); |
}; |
-#endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ |
+#endif // CHROME_BROWSER_UI_SEARCH_INSTANT_UITEST_BASE_H_ |