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

Unified Diff: chrome/browser/profiles/profile_info_cache_unittest.cc

Issue 8894005: Ensure that use of GAIA names are considered when handling desktop shortcut changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: beefed comment Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_unittest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_cache_unittest.cc
===================================================================
--- chrome/browser/profiles/profile_info_cache_unittest.cc (revision 114091)
+++ chrome/browser/profiles/profile_info_cache_unittest.cc (working copy)
@@ -22,6 +22,44 @@
using content::BrowserThread;
+ProfileNameVerifierObserver::ProfileNameVerifierObserver() {
+}
+
+ProfileNameVerifierObserver::~ProfileNameVerifierObserver() {
+}
+
+void ProfileNameVerifierObserver::OnProfileAdded(
+ const string16& profile_name,
+ const string16& profile_base_dir,
+ const FilePath& profile_path,
+ const gfx::Image* avatar_image) {
+ EXPECT_TRUE(profile_names_.find(profile_name) == profile_names_.end());
+ profile_names_.insert(profile_name);
+}
+
+void ProfileNameVerifierObserver::OnProfileRemoved(
+ const string16& profile_name) {
+ EXPECT_TRUE(profile_names_.find(profile_name) != profile_names_.end());
+ profile_names_.erase(profile_name);
+}
+
+void ProfileNameVerifierObserver::OnProfileNameChanged(
+ const string16& old_profile_name,
+ const string16& new_profile_name) {
+ EXPECT_TRUE(profile_names_.find(old_profile_name) != profile_names_.end());
+ EXPECT_TRUE(profile_names_.find(new_profile_name) == profile_names_.end());
+ profile_names_.erase(old_profile_name);
+ profile_names_.insert(new_profile_name);
+}
+
+void ProfileNameVerifierObserver::OnProfileAvatarChanged(
+ const string16& profile_name,
+ const string16& profile_base_dir,
+ const FilePath& profile_path,
+ const gfx::Image* avatar_image) {
+ EXPECT_TRUE(profile_names_.find(profile_name) != profile_names_.end());
+}
+
ProfileInfoCacheTest::ProfileInfoCacheTest()
: testing_profile_manager_(
static_cast<TestingBrowserProcess*>(g_browser_process)),
@@ -34,6 +72,7 @@
void ProfileInfoCacheTest::SetUp() {
ASSERT_TRUE(testing_profile_manager_.SetUp());
+ testing_profile_manager_.profile_info_cache()->AddObserver(&name_observer_);
}
void ProfileInfoCacheTest::TearDown() {
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698