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

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

Issue 3069014: Convert a bunch of easy AppendSwitchWithValue to *ASCII. (Closed)
Patch Set: fix Created 10 years, 4 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/system_monitor.h" 5 #include "app/system_monitor.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_util.h" 7 #include "base/file_util.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 "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 #if defined(OS_CHROMEOS) 90 #if defined(OS_CHROMEOS)
91 // This functionality only exists on Chrome OS. 91 // This functionality only exists on Chrome OS.
92 TEST_F(ProfileManagerTest, LoggedInProfileDir) { 92 TEST_F(ProfileManagerTest, LoggedInProfileDir) {
93 CommandLine *cl = CommandLine::ForCurrentProcess(); 93 CommandLine *cl = CommandLine::ForCurrentProcess();
94 SystemMonitor dummy; 94 SystemMonitor dummy;
95 ProfileManager profile_manager; 95 ProfileManager profile_manager;
96 std::string profile_dir("my_user"); 96 std::string profile_dir("my_user");
97 97
98 cl->AppendSwitchWithValue(switches::kLoginProfile, profile_dir); 98 cl->AppendSwitchASCII(switches::kLoginProfile, profile_dir);
99 cl->AppendSwitch(switches::kTestType); 99 cl->AppendSwitch(switches::kTestType);
100 100
101 FilePath expected_default = 101 FilePath expected_default =
102 FilePath::FromWStringHack(chrome::kNotSignedInProfile); 102 FilePath::FromWStringHack(chrome::kNotSignedInProfile);
103 EXPECT_EQ(expected_default.value(), 103 EXPECT_EQ(expected_default.value(),
104 profile_manager.GetCurrentProfileDir().value()); 104 profile_manager.GetCurrentProfileDir().value());
105 105
106 profile_manager.Observe(NotificationType::LOGIN_USER_CHANGED, 106 profile_manager.Observe(NotificationType::LOGIN_USER_CHANGED,
107 NotificationService::AllSources(), 107 NotificationService::AllSources(),
108 NotificationService::NoDetails()); 108 NotificationService::NoDetails());
(...skipping 28 matching lines...) Expand all
137 ASSERT_TRUE(profile2.get()); 137 ASSERT_TRUE(profile2.get());
138 138
139 // Force lazy-init of some profile services to simulate use. 139 // Force lazy-init of some profile services to simulate use.
140 EXPECT_TRUE(profile1->GetHistoryService(Profile::EXPLICIT_ACCESS)); 140 EXPECT_TRUE(profile1->GetHistoryService(Profile::EXPLICIT_ACCESS));
141 EXPECT_TRUE(profile1->GetBookmarkModel()); 141 EXPECT_TRUE(profile1->GetBookmarkModel());
142 EXPECT_TRUE(profile2->GetBookmarkModel()); 142 EXPECT_TRUE(profile2->GetBookmarkModel());
143 EXPECT_TRUE(profile2->GetHistoryService(Profile::EXPLICIT_ACCESS)); 143 EXPECT_TRUE(profile2->GetHistoryService(Profile::EXPLICIT_ACCESS));
144 profile1.reset(); 144 profile1.reset();
145 profile2.reset(); 145 profile2.reset();
146 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698