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

Unified Diff: chrome/browser/background/background_mode_manager_unittest.cc

Issue 9271018: Merge 115621 - Refactor ProfileInfoCacheObserver interface and usage thereof. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_mode_manager_unittest.cc
===================================================================
--- chrome/browser/background/background_mode_manager_unittest.cc (revision 118523)
+++ chrome/browser/background/background_mode_manager_unittest.cc (working copy)
@@ -258,36 +258,31 @@
manager.RegisterProfile(profile1);
EXPECT_FALSE(BrowserList::WillKeepAlive());
- ProfileInfoCache* cache = profile_manager_.profile_info_cache();
-
// Install app, should show status tray icon.
manager.OnBackgroundAppInstalled(NULL);
manager.SetBackgroundAppCount(1);
manager.SetBackgroundAppCountForProfile(1);
manager.OnApplicationListChanged(profile1);
- string16 p1name = cache->GetNameOfProfileAtIndex(0);
- manager.OnProfileNameChanged(p1name, UTF8ToUTF16("p1new"));
+ manager.OnProfileNameChanged(
+ profile1->GetPath(),
+ manager.GetBackgroundModeData(profile1)->name());
- EXPECT_EQ(UTF8ToUTF16("p1new"),
+ EXPECT_EQ(UTF8ToUTF16("p1"),
manager.GetBackgroundModeData(profile1)->name());
TestingProfile* profile2 = profile_manager_.CreateTestingProfile("p2");
manager.RegisterProfile(profile2);
EXPECT_EQ(2, manager.NumberOfBackgroundModeData());
- gfx::Image gaia_image(gfx::test::CreateImage());
- manager.OnProfileAdded(UTF8ToUTF16("p2new"),
- profile2->GetPath().BaseName().LossyDisplayName(),
- profile2->GetPath(),
- &gaia_image);
- EXPECT_EQ(UTF8ToUTF16("p2new"),
+ manager.OnProfileAdded(profile2->GetPath());
+ EXPECT_EQ(UTF8ToUTF16("p2"),
manager.GetBackgroundModeData(profile2)->name());
- manager.OnProfileWillBeRemoved(UTF8ToUTF16("p2new"));
+ manager.OnProfileWillBeRemoved(profile2->GetPath());
EXPECT_EQ(1, manager.NumberOfBackgroundModeData());
// Check that the background mode data we think is in the map actually is.
- EXPECT_EQ(UTF8ToUTF16("p1new"),
+ EXPECT_EQ(UTF8ToUTF16("p1"),
manager.GetBackgroundModeData(profile1)->name());
}
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698