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