OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/public/test/browser_test_base.h" | 5 #include "content/public/test/browser_test_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "content/public/common/content_switches.h" | 11 #include "content/public/common/content_switches.h" |
12 #include "content/public/common/main_function_params.h" | 12 #include "content/public/common/main_function_params.h" |
13 | 13 |
14 #if defined(OS_MACOSX) | 14 #if defined(OS_MACOSX) |
15 #include "base/mac/mac_util.h" | 15 #include "base/mac/mac_util.h" |
16 #include "base/system_monitor/system_monitor.h" | 16 #include "base/power_monitor/power_monitor.h" |
17 #endif | 17 #endif |
18 | 18 |
19 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) |
20 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
21 #include "content/public/browser/browser_main_runner.h" | 21 #include "content/public/browser/browser_main_runner.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #endif | 23 #endif |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
(...skipping 18 matching lines...) Expand all Loading... |
45 | 45 |
46 } // namespace | 46 } // namespace |
47 | 47 |
48 namespace content { | 48 namespace content { |
49 | 49 |
50 extern int BrowserMain(const content::MainFunctionParams&); | 50 extern int BrowserMain(const content::MainFunctionParams&); |
51 | 51 |
52 BrowserTestBase::BrowserTestBase() { | 52 BrowserTestBase::BrowserTestBase() { |
53 #if defined(OS_MACOSX) | 53 #if defined(OS_MACOSX) |
54 base::mac::SetOverrideAmIBundled(true); | 54 base::mac::SetOverrideAmIBundled(true); |
55 base::SystemMonitor::AllocateSystemIOPorts(); | 55 base::PowerMonitor::AllocateSystemIOPorts(); |
56 #endif | 56 #endif |
57 | 57 |
58 #if defined(OS_POSIX) | 58 #if defined(OS_POSIX) |
59 handle_sigterm_ = true; | 59 handle_sigterm_ = true; |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 BrowserTestBase::~BrowserTestBase() { | 63 BrowserTestBase::~BrowserTestBase() { |
64 #if defined(OS_ANDROID) | 64 #if defined(OS_ANDROID) |
65 // RemoteTestServer can cause wait on the UI thread. | 65 // RemoteTestServer can cause wait on the UI thread. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 void BrowserTestBase::CreateTestServer(const base::FilePath& test_server_base) { | 115 void BrowserTestBase::CreateTestServer(const base::FilePath& test_server_base) { |
116 CHECK(!test_server_.get()); | 116 CHECK(!test_server_.get()); |
117 test_server_.reset(new net::TestServer( | 117 test_server_.reset(new net::TestServer( |
118 net::TestServer::TYPE_HTTP, | 118 net::TestServer::TYPE_HTTP, |
119 net::TestServer::kLocalhost, | 119 net::TestServer::kLocalhost, |
120 test_server_base)); | 120 test_server_base)); |
121 } | 121 } |
122 | 122 |
123 } // namespace content | 123 } // namespace content |
OLD | NEW |