Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_BASE_H_ |
| 6 | #define CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_BASE_H_ |
| 7 | |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 8 | #include "net/test/embedded_test_server/embedded_test_server.h" |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 9 | |
Tibor Goldschwendt | 55ff021 | 2020-11-04 17:37:48 | [diff] [blame] | 10 | class GURL; |
| 11 | class Profile; |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 12 | |
| 13 | // This utility class is meant to be used in a "mix-in" fashion, giving the |
| 14 | // derived test class additional Instant-related functionality. |
| 15 | class InstantTestBase { |
Tibor Goldschwendt | 55ff021 | 2020-11-04 17:37:48 | [diff] [blame] | 16 | public: |
| 17 | InstantTestBase(const InstantTestBase&) = delete; |
| 18 | InstantTestBase& operator=(const InstantTestBase&) = delete; |
| 19 | |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 20 | protected: |
| 21 | InstantTestBase(); |
| 22 | virtual ~InstantTestBase(); |
| 23 | |
Tibor Goldschwendt | 55ff021 | 2020-11-04 17:37:48 | [diff] [blame] | 24 | void SetupInstant(Profile* profile, |
| 25 | const GURL& base_url, |
| 26 | const GURL& ntp_url); |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 27 | |
| 28 | net::EmbeddedTestServer& https_test_server() { return https_test_server_; } |
| 29 | |
| 30 | private: |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 31 | // HTTPS Testing server, started on demand. |
| 32 | net::EmbeddedTestServer https_test_server_; |
treib | 11b6b379 | 2017-05-04 08:31:12 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_BASE_H_ |