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

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

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase bug. Created 5 years, 1 month 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
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/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_instant_controller.h" 16 #include "chrome/browser/ui/browser_instant_controller.h"
17 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
18 #include "chrome/browser/ui/location_bar/location_bar.h" 18 #include "chrome/browser/ui/location_bar/location_bar.h"
19 #include "chrome/browser/ui/search/instant_controller.h" 19 #include "chrome/browser/ui/search/instant_controller.h"
20 #include "chrome/common/search_types.h" 20 #include "chrome/common/search_types.h"
21 #include "net/test/spawned_test_server/spawned_test_server.h" 21 #include "net/test/embedded_test_server/embedded_test_server.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 class BrowserInstantController; 24 class BrowserInstantController;
25 class InstantController; 25 class InstantController;
26 class InstantModel; 26 class InstantModel;
27 class OmniboxView; 27 class OmniboxView;
28 28
29 namespace content { 29 namespace content {
30 class WebContents; 30 class WebContents;
31 }; 31 };
(...skipping 25 matching lines...) Expand all
57 } 57 }
58 58
59 OmniboxView* omnibox() { 59 OmniboxView* omnibox() {
60 return browser_->window()->GetLocationBar()->GetOmniboxView(); 60 return browser_->window()->GetLocationBar()->GetOmniboxView();
61 } 61 }
62 62
63 const GURL& instant_url() const { return instant_url_; } 63 const GURL& instant_url() const { return instant_url_; }
64 64
65 const GURL& ntp_url() const { return ntp_url_; } 65 const GURL& ntp_url() const { return ntp_url_; }
66 66
67 net::SpawnedTestServer& https_test_server() { return https_test_server_; } 67 net::EmbeddedTestServer& https_test_server() { return https_test_server_; }
68 68
69 void KillInstantRenderView(); 69 void KillInstantRenderView();
70 70
71 void FocusOmnibox(); 71 void FocusOmnibox();
72 72
73 void SetOmniboxText(const std::string& text); 73 void SetOmniboxText(const std::string& text);
74 74
75 void PressEnterAndWaitForNavigation(); 75 void PressEnterAndWaitForNavigation();
76 void PressEnterAndWaitForFrameLoad(); 76 void PressEnterAndWaitForFrameLoad();
77 77
(...skipping 21 matching lines...) Expand all
99 // Returns the omnibox's inline autocompletion (shown in blue highlight). 99 // Returns the omnibox's inline autocompletion (shown in blue highlight).
100 base::string16 GetBlueText(); 100 base::string16 GetBlueText();
101 101
102 private: 102 private:
103 GURL instant_url_; 103 GURL instant_url_;
104 GURL ntp_url_; 104 GURL ntp_url_;
105 105
106 Browser* browser_; 106 Browser* browser_;
107 107
108 // HTTPS Testing server, started on demand. 108 // HTTPS Testing server, started on demand.
109 net::SpawnedTestServer https_test_server_; 109 net::EmbeddedTestServer https_test_server_;
110 110
111 // Set to true to initialize suggestions URL in default search provider. 111 // Set to true to initialize suggestions URL in default search provider.
112 bool init_suggestions_url_; 112 bool init_suggestions_url_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(InstantTestBase); 114 DISALLOW_COPY_AND_ASSIGN(InstantTestBase);
115 }; 115 };
116 116
117 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_ 117 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698