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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 class ProfileManagerTest : public testing::Test { | 43 class ProfileManagerTest : public testing::Test { |
44 protected: | 44 protected: |
45 ProfileManagerTest() | 45 ProfileManagerTest() |
46 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), | 46 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), |
47 extension_event_router_forwarder_(new ExtensionEventRouterForwarder), | 47 extension_event_router_forwarder_(new ExtensionEventRouterForwarder), |
48 ui_thread_(BrowserThread::UI, &message_loop_), | 48 ui_thread_(BrowserThread::UI, &message_loop_), |
49 db_thread_(BrowserThread::DB, &message_loop_), | 49 db_thread_(BrowserThread::DB, &message_loop_), |
50 file_thread_(BrowserThread::FILE, &message_loop_), | 50 file_thread_(BrowserThread::FILE, &message_loop_), |
51 io_thread_(local_state_.Get(), NULL, extension_event_router_forwarder_), | 51 io_thread_(local_state_.Get(), new SpdyConfigServiceManager(), NULL, |
| 52 extension_event_router_forwarder_), |
52 profile_manager_(new ProfileManagerWithoutInit(temp_dir_.path())) { | 53 profile_manager_(new ProfileManagerWithoutInit(temp_dir_.path())) { |
53 #if defined(OS_MACOSX) | 54 #if defined(OS_MACOSX) |
54 base::SystemMonitor::AllocateSystemIOPorts(); | 55 base::SystemMonitor::AllocateSystemIOPorts(); |
55 #endif | 56 #endif |
56 system_monitor_dummy_.reset(new base::SystemMonitor); | 57 system_monitor_dummy_.reset(new base::SystemMonitor); |
57 static_cast<TestingBrowserProcess*>(g_browser_process)->SetIOThread( | 58 static_cast<TestingBrowserProcess*>(g_browser_process)->SetIOThread( |
58 &io_thread_); | 59 &io_thread_); |
59 } | 60 } |
60 | 61 |
61 virtual void SetUp() { | 62 virtual void SetUp() { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 259 |
259 MockObserver mock_observer; | 260 MockObserver mock_observer; |
260 EXPECT_CALL(mock_observer, OnProfileCreated( | 261 EXPECT_CALL(mock_observer, OnProfileCreated( |
261 testing::NotNull(), NotFail())).Times(testing::AtLeast(3)); | 262 testing::NotNull(), NotFail())).Times(testing::AtLeast(3)); |
262 | 263 |
263 profile_manager_->CreateProfileAsync(dest_path1, &mock_observer); | 264 profile_manager_->CreateProfileAsync(dest_path1, &mock_observer); |
264 profile_manager_->CreateProfileAsync(dest_path2, &mock_observer); | 265 profile_manager_->CreateProfileAsync(dest_path2, &mock_observer); |
265 | 266 |
266 message_loop_.RunAllPending(); | 267 message_loop_.RunAllPending(); |
267 } | 268 } |
OLD | NEW |