OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> |
| 6 |
5 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
6 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/profiles/profile_info_cache.h" | 10 #include "chrome/browser/profiles/profile_info_cache.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 12 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
11 #include "chrome/test/base/testing_browser_process.h" | 13 #include "chrome/test/base/testing_browser_process.h" |
12 #include "chrome/test/base/testing_profile_manager.h" | 14 #include "chrome/test/base/testing_profile_manager.h" |
13 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // should be reflected by the ProfileAttributesStorage. | 377 // should be reflected by the ProfileAttributesStorage. |
376 size_t index = profile_info_cache()->GetIndexOfProfileWithPath( | 378 size_t index = profile_info_cache()->GetIndexOfProfileWithPath( |
377 GetProfilePath("testing_profile_path0")); | 379 GetProfilePath("testing_profile_path0")); |
378 EXPECT_EQ(base::ASCIIToUTF16("NewName"), | 380 EXPECT_EQ(base::ASCIIToUTF16("NewName"), |
379 profile_info_cache()->GetNameOfProfileAtIndex(index)); | 381 profile_info_cache()->GetNameOfProfileAtIndex(index)); |
380 | 382 |
381 profile_info_cache()->SetNameOfProfileAtIndex( | 383 profile_info_cache()->SetNameOfProfileAtIndex( |
382 index, base::ASCIIToUTF16("OtherNewName")); | 384 index, base::ASCIIToUTF16("OtherNewName")); |
383 EXPECT_EQ(base::ASCIIToUTF16("OtherNewName"), first_entry->GetName()); | 385 EXPECT_EQ(base::ASCIIToUTF16("OtherNewName"), first_entry->GetName()); |
384 } | 386 } |
OLD | NEW |