blob: 0486ee4bef432e11fa485000cbbdea2ead8bcda4 [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2013 The Chromium Authors
treib11b6b3792017-05-04 08:31:122// 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
treib11b6b3792017-05-04 08:31:128#include "net/test/embedded_test_server/embedded_test_server.h"
treib11b6b3792017-05-04 08:31:129
Tibor Goldschwendt55ff0212020-11-04 17:37:4810class GURL;
11class Profile;
treib11b6b3792017-05-04 08:31:1212
13// This utility class is meant to be used in a "mix-in" fashion, giving the
14// derived test class additional Instant-related functionality.
15class InstantTestBase {
Tibor Goldschwendt55ff0212020-11-04 17:37:4816 public:
17 InstantTestBase(const InstantTestBase&) = delete;
18 InstantTestBase& operator=(const InstantTestBase&) = delete;
19
treib11b6b3792017-05-04 08:31:1220 protected:
21 InstantTestBase();
22 virtual ~InstantTestBase();
23
Tibor Goldschwendt55ff0212020-11-04 17:37:4824 void SetupInstant(Profile* profile,
25 const GURL& base_url,
26 const GURL& ntp_url);
treib11b6b3792017-05-04 08:31:1227
28 net::EmbeddedTestServer& https_test_server() { return https_test_server_; }
29
30 private:
treib11b6b3792017-05-04 08:31:1231 // HTTPS Testing server, started on demand.
32 net::EmbeddedTestServer https_test_server_;
treib11b6b3792017-05-04 08:31:1233};
34
35#endif // CHROME_BROWSER_UI_SEARCH_INSTANT_TEST_BASE_H_