OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBUI_NET_INTERNALS_NET_INTERNALS_UI_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NET_INTERNALS_NET_INTERNALS_UI_BROWSERTEST_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NET_INTERNALS_NET_INTERNALS_UI_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NET_INTERNALS_NET_INTERNALS_UI_BROWSERTEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chrome/test/base/web_ui_browser_test.h" | 11 #include "chrome/test/base/web_ui_browser_test.h" |
12 | 12 |
13 class GURL; | 13 class GURL; |
14 | 14 |
15 class NetInternalsTest : public WebUIBrowserTest { | 15 class NetInternalsTest : public WebUIBrowserTest { |
16 protected: | 16 protected: |
17 NetInternalsTest(); | 17 NetInternalsTest(); |
18 ~NetInternalsTest() override; | 18 ~NetInternalsTest() override; |
19 | 19 |
20 private: | 20 private: |
21 class MessageHandler; | 21 class MessageHandler; |
22 | 22 |
23 // InProcessBrowserTest overrides. | 23 // InProcessBrowserTest overrides. |
24 void SetUpCommandLine(base::CommandLine* command_line) override; | |
25 void SetUpOnMainThread() override; | 24 void SetUpOnMainThread() override; |
26 | 25 |
27 // WebUIBrowserTest implementation. | 26 // WebUIBrowserTest implementation. |
28 content::WebUIMessageHandler* GetMockMessageHandler() override; | 27 content::WebUIMessageHandler* GetMockMessageHandler() override; |
29 | 28 |
30 GURL CreatePrerenderLoaderUrl(const GURL& prerender_url); | 29 GURL CreatePrerenderLoaderUrl(const GURL& prerender_url); |
31 | 30 |
32 // Attempts to start the test server. Returns true on success or if the | 31 // Attempts to start the test server. Returns true on success or if the |
33 // TestServer is already started. | 32 // TestServer is already started. |
34 bool StartTestServer(); | 33 bool StartTestServer(); |
35 | 34 |
36 std::unique_ptr<MessageHandler> message_handler_; | 35 std::unique_ptr<MessageHandler> message_handler_; |
37 | 36 |
38 // True if the test server has already been successfully started. | 37 // True if the test server has already been successfully started. |
39 bool test_server_started_; | 38 bool test_server_started_; |
40 | 39 |
41 DISALLOW_COPY_AND_ASSIGN(NetInternalsTest); | 40 DISALLOW_COPY_AND_ASSIGN(NetInternalsTest); |
42 }; | 41 }; |
43 | 42 |
44 #endif // CHROME_BROWSER_UI_WEBUI_NET_INTERNALS_NET_INTERNALS_UI_BROWSERTEST_H_ | 43 #endif // CHROME_BROWSER_UI_WEBUI_NET_INTERNALS_NET_INTERNALS_UI_BROWSERTEST_H_ |
OLD | NEW |