Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: chrome/browser/profiles/profile_manager_unittest.cc

Issue 10959020: SystemMonitor refactoring: move power state monitor into a separate class called PowerMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: make HWNDMessageHandler as a friend class of PowerMonitor Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 }; 90 };
91 91
92 ProfileManagerTest() 92 ProfileManagerTest()
93 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), 93 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)),
94 extension_event_router_forwarder_(new extensions::EventRouterForwarder), 94 extension_event_router_forwarder_(new extensions::EventRouterForwarder),
95 ui_thread_(BrowserThread::UI, &message_loop_), 95 ui_thread_(BrowserThread::UI, &message_loop_),
96 db_thread_(BrowserThread::DB, &message_loop_), 96 db_thread_(BrowserThread::DB, &message_loop_),
97 file_thread_(BrowserThread::FILE, &message_loop_), 97 file_thread_(BrowserThread::FILE, &message_loop_),
98 io_thread_(local_state_.Get(), NULL, 98 io_thread_(local_state_.Get(), NULL,
99 extension_event_router_forwarder_) { 99 extension_event_router_forwarder_) {
100 #if defined(OS_MACOSX)
vandebo (ex-Chrome) 2012/10/11 00:58:43 If you look at the change that introduced this, I
Hongbo Min 2012/10/11 07:57:53 I keep it for safety.
101 base::SystemMonitor::AllocateSystemIOPorts();
102 #endif
103 system_monitor_dummy_.reset(new base::SystemMonitor); 100 system_monitor_dummy_.reset(new base::SystemMonitor);
104 static_cast<TestingBrowserProcess*>(g_browser_process)->SetIOThread( 101 static_cast<TestingBrowserProcess*>(g_browser_process)->SetIOThread(
105 &io_thread_); 102 &io_thread_);
106 } 103 }
107 104
108 virtual void SetUp() { 105 virtual void SetUp() {
109 // Create a new temporary directory, and store the path 106 // Create a new temporary directory, and store the path
110 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 107 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
111 static_cast<TestingBrowserProcess*>(g_browser_process)->SetProfileManager( 108 static_cast<TestingBrowserProcess*>(g_browser_process)->SetProfileManager(
112 new testing::ProfileManager(temp_dir_.path())); 109 new testing::ProfileManager(temp_dir_.path()));
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 browser2b.reset(); 556 browser2b.reset();
560 last_opened_profiles = profile_manager->GetLastOpenedProfiles(); 557 last_opened_profiles = profile_manager->GetLastOpenedProfiles();
561 ASSERT_EQ(1U, last_opened_profiles.size()); 558 ASSERT_EQ(1U, last_opened_profiles.size());
562 EXPECT_EQ(profile1, last_opened_profiles[0]); 559 EXPECT_EQ(profile1, last_opened_profiles[0]);
563 560
564 browser1.reset(); 561 browser1.reset();
565 last_opened_profiles = profile_manager->GetLastOpenedProfiles(); 562 last_opened_profiles = profile_manager->GetLastOpenedProfiles();
566 ASSERT_EQ(0U, last_opened_profiles.size()); 563 ASSERT_EQ(0U, last_opened_profiles.size());
567 } 564 }
568 #endif // !defined(OS_ANDROID) 565 #endif // !defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698