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

Side by Side Diff: chrome/browser/chromeos/profiles/profile_helper_browsertest.cc

Issue 14581006: [cros mp] Load profiles from /home/chronos/u-[$hash], add GetUserIdHashFromProfile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <string>
6
7 #include "base/files/file_path.h"
8 #include "chrome/browser/chromeos/profiles/profile_helper.h"
9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace chromeos {
13
14 namespace {
15 static const char kActiveUserHash[] = "01234567890";
16 } // namespace
17
18 class ProfileHelperTest : public InProcessBrowserTest {
19 public:
20 ProfileHelperTest() {
21 }
22
23 protected:
24 void ActiveUserChanged(ProfileHelper* profile_helper,
25 const std::string& hash) {
26 profile_helper->ActiveUserHashChanged(hash);
27 }
28 };
29
30 IN_PROC_BROWSER_TEST_F(ProfileHelperTest, ActiveUserProfileDir) {
31 ProfileHelper profile_helper;
32 ActiveUserChanged(&profile_helper, kActiveUserHash);
33 base::FilePath profile_dir = profile_helper.GetActiveUserProfileDir();
34 std::string expected_dir;
35 expected_dir.append(ProfileHelper::kProfileDirPrefix);
36 expected_dir.append(kActiveUserHash);
37 EXPECT_EQ(expected_dir, profile_dir.BaseName().value());
38 }
39
40 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698