| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/profiles/profile_info_cache.h" | 5 #include "chrome/browser/profiles/profile_info_cache.h" |
| 6 | 6 |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/test/base/testing_browser_process_test.h" |
| 9 #include "chrome/test/base/testing_pref_service.h" | 10 #include "chrome/test/base/testing_pref_service.h" |
| 10 #include "chrome/test/testing_browser_process_test.h" | |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 class ProfileInfoCacheUnittests : public TestingBrowserProcessTest { | 17 class ProfileInfoCacheUnittests : public TestingBrowserProcessTest { |
| 18 protected: | 18 protected: |
| 19 ProfileInfoCacheUnittests() : local_state_(testing_browser_process_.get()) { | 19 ProfileInfoCacheUnittests() : local_state_(testing_browser_process_.get()) { |
| 20 cache_.reset(new ProfileInfoCache(local_state_.Get(), GetUserDataDir())); | 20 cache_.reset(new ProfileInfoCache(local_state_.Get(), GetUserDataDir())); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 EXPECT_EQ(new_name, cache_->GetNameOfProfileAtIndex(1)); | 91 EXPECT_EQ(new_name, cache_->GetNameOfProfileAtIndex(1)); |
| 92 EXPECT_NE(new_name, cache_->GetNameOfProfileAtIndex(0)); | 92 EXPECT_NE(new_name, cache_->GetNameOfProfileAtIndex(0)); |
| 93 | 93 |
| 94 size_t new_icon_index = 3; | 94 size_t new_icon_index = 3; |
| 95 cache_->SetAvatarIconOfProfileAtIndex(1, new_icon_index); | 95 cache_->SetAvatarIconOfProfileAtIndex(1, new_icon_index); |
| 96 // Not much to test. | 96 // Not much to test. |
| 97 cache_->GetAvatarIconOfProfileAtIndex(1); | 97 cache_->GetAvatarIconOfProfileAtIndex(1); |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace | 100 } // namespace |
| OLD | NEW |