| OLD | NEW |
| (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 |
| OLD | NEW |