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

Side by Side Diff: chrome/browser/chromeos/login/crash_restore_browsertest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 19 matching lines...) Expand all
30 const char kUserId3[] = "user3@example.com"; 30 const char kUserId3[] = "user3@example.com";
31 31
32 } // namespace 32 } // namespace
33 33
34 class CrashRestoreSimpleTest : public InProcessBrowserTest { 34 class CrashRestoreSimpleTest : public InProcessBrowserTest {
35 protected: 35 protected:
36 CrashRestoreSimpleTest() {} 36 CrashRestoreSimpleTest() {}
37 37
38 virtual ~CrashRestoreSimpleTest() {} 38 virtual ~CrashRestoreSimpleTest() {}
39 39
40 virtual void SetUpCommandLine(CommandLine* command_line) override { 40 virtual void SetUpCommandLine(base::CommandLine* command_line) override {
41 command_line->AppendSwitchASCII(switches::kLoginUser, kUserId1); 41 command_line->AppendSwitchASCII(switches::kLoginUser, kUserId1);
42 command_line->AppendSwitchASCII( 42 command_line->AppendSwitchASCII(
43 switches::kLoginProfile, 43 switches::kLoginProfile,
44 CryptohomeClient::GetStubSanitizedUsername(kUserId1)); 44 CryptohomeClient::GetStubSanitizedUsername(kUserId1));
45 } 45 }
46 46
47 virtual void SetUpInProcessBrowserTestFixture() override { 47 virtual void SetUpInProcessBrowserTestFixture() override {
48 // Redirect session_manager DBus calls to FakeSessionManagerClient. 48 // Redirect session_manager DBus calls to FakeSessionManagerClient.
49 session_manager_client_ = new FakeSessionManagerClient; 49 session_manager_client_ = new FakeSessionManagerClient;
50 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( 50 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 users[0]->username_hash()); 144 users[0]->username_hash());
145 EXPECT_EQ(kUserId2, users[1]->email()); 145 EXPECT_EQ(kUserId2, users[1]->email());
146 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(kUserId2), 146 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(kUserId2),
147 users[1]->username_hash()); 147 users[1]->username_hash());
148 EXPECT_EQ(kUserId1, users[2]->email()); 148 EXPECT_EQ(kUserId1, users[2]->email());
149 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(kUserId1), 149 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(kUserId1),
150 users[2]->username_hash()); 150 users[2]->username_hash());
151 } 151 }
152 152
153 } // namespace chromeos 153 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698