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

Side by Side Diff: chrome/browser/chromeos/login/users/user_manager_unittest.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <cstdlib> 5 #include <cstdlib>
6 #include <cstring> 6 #include <cstring>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return NULL; 47 return NULL;
48 } 48 }
49 return new TestingProfile(file_path, NULL); 49 return new TestingProfile(file_path, NULL);
50 } 50 }
51 }; 51 };
52 52
53 53
54 class UserManagerTest : public testing::Test { 54 class UserManagerTest : public testing::Test {
55 protected: 55 protected:
56 virtual void SetUp() override { 56 virtual void SetUp() override {
57 CommandLine& command_line = *CommandLine::ForCurrentProcess(); 57 base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
58 command_line.AppendSwitch(::switches::kTestType); 58 command_line.AppendSwitch(::switches::kTestType);
59 command_line.AppendSwitch( 59 command_line.AppendSwitch(
60 chromeos::switches::kIgnoreUserProfileMappingForTests); 60 chromeos::switches::kIgnoreUserProfileMappingForTests);
61 61
62 cros_settings_ = CrosSettings::Get(); 62 cros_settings_ = CrosSettings::Get();
63 63
64 // Replace the real DeviceSettingsProvider with a stub. 64 // Replace the real DeviceSettingsProvider with a stub.
65 device_settings_provider_ = 65 device_settings_provider_ =
66 cros_settings_->GetProvider(chromeos::kReportDeviceVersionInfo); 66 cros_settings_->GetProvider(chromeos::kReportDeviceVersionInfo);
67 EXPECT_TRUE(device_settings_provider_); 67 EXPECT_TRUE(device_settings_provider_);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 "user0@invalid.domain", "user0@invalid.domain", false); 215 "user0@invalid.domain", "user0@invalid.domain", false);
216 ResetUserManager(); 216 ResetUserManager();
217 217
218 const user_manager::UserList* users = 218 const user_manager::UserList* users =
219 &user_manager::UserManager::Get()->GetUsers(); 219 &user_manager::UserManager::Get()->GetUsers();
220 EXPECT_EQ(1U, users->size()); 220 EXPECT_EQ(1U, users->size());
221 EXPECT_EQ((*users)[0]->email(), "owner@invalid.domain"); 221 EXPECT_EQ((*users)[0]->email(), "owner@invalid.domain");
222 } 222 }
223 223
224 } // namespace chromeos 224 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698