Index: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_unittest.cc |
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_unittest.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_unittest.cc |
index ca42bdecd0ececbafa363e537a9947e8be907bda..5d6caf31217202f500d2aa559772b30b6d3346bf 100644 |
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_unittest.cc |
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_unittest.cc |
@@ -95,36 +95,30 @@ TEST_F(WallpaperManagerCacheTest, VerifyWallpaperCache) { |
gfx::ImageSkia test_user_1_wallpaper = CreateTestImage(SK_ColorRED); |
gfx::ImageSkia test_user_2_wallpaper = CreateTestImage(SK_ColorGREEN); |
gfx::ImageSkia test_user_3_wallpaper = CreateTestImage(SK_ColorWHITE); |
- test_api->SetWallpaperCache(test_account_id_1.GetUserEmail(), path1, |
- test_user_1_wallpaper); |
- test_api->SetWallpaperCache(test_account_id_2.GetUserEmail(), path2, |
- test_user_2_wallpaper); |
- test_api->SetWallpaperCache(test_account_id_3.GetUserEmail(), path3, |
- test_user_3_wallpaper); |
+ test_api->SetWallpaperCache(test_account_id_1, path1, test_user_1_wallpaper); |
+ test_api->SetWallpaperCache(test_account_id_2, path2, test_user_2_wallpaper); |
+ test_api->SetWallpaperCache(test_account_id_3, path3, test_user_3_wallpaper); |
test_api->ClearDisposableWallpaperCache(); |
gfx::ImageSkia cached_wallpaper; |
- EXPECT_TRUE(test_api->GetWallpaperFromCache(test_account_id_1.GetUserEmail(), |
- &cached_wallpaper)); |
- base::FilePath path; |
EXPECT_TRUE( |
- test_api->GetPathFromCache(test_account_id_1.GetUserEmail(), &path)); |
+ test_api->GetWallpaperFromCache(test_account_id_1, &cached_wallpaper)); |
+ base::FilePath path; |
+ EXPECT_TRUE(test_api->GetPathFromCache(test_account_id_1, &path)); |
// Logged in users' wallpaper cache should be kept. |
EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(test_user_1_wallpaper)); |
EXPECT_EQ(path, path1); |
- EXPECT_TRUE(test_api->GetWallpaperFromCache(test_account_id_2.GetUserEmail(), |
- &cached_wallpaper)); |
EXPECT_TRUE( |
- test_api->GetPathFromCache(test_account_id_2.GetUserEmail(), &path)); |
+ test_api->GetWallpaperFromCache(test_account_id_2, &cached_wallpaper)); |
+ EXPECT_TRUE(test_api->GetPathFromCache(test_account_id_2, &path)); |
EXPECT_TRUE(cached_wallpaper.BackedBySameObjectAs(test_user_2_wallpaper)); |
EXPECT_EQ(path, path2); |
// Not logged in user's wallpaper cache should be cleared. |
- EXPECT_FALSE(test_api->GetWallpaperFromCache(test_account_id_3.GetUserEmail(), |
- &cached_wallpaper)); |
EXPECT_FALSE( |
- test_api->GetPathFromCache(test_account_id_3.GetUserEmail(), &path)); |
+ test_api->GetWallpaperFromCache(test_account_id_3, &cached_wallpaper)); |
+ EXPECT_FALSE(test_api->GetPathFromCache(test_account_id_3, &path)); |
} |
// Test that the user's wallpaper cache is cleared after the user is removed. |
@@ -143,26 +137,24 @@ TEST_F(WallpaperManagerCacheTest, CacheClearedOnUserRemoval) { |
const gfx::ImageSkia test_user_1_wallpaper = CreateTestImage(SK_ColorRED); |
const gfx::ImageSkia test_user_2_wallpaper = CreateTestImage(SK_ColorGREEN); |
- test_api->SetWallpaperCache(test_account_id_1.GetUserEmail(), path1, |
- test_user_1_wallpaper); |
- test_api->SetWallpaperCache(test_account_id_2.GetUserEmail(), path2, |
- test_user_2_wallpaper); |
+ test_api->SetWallpaperCache(test_account_id_1, path1, test_user_1_wallpaper); |
+ test_api->SetWallpaperCache(test_account_id_2, path2, test_user_2_wallpaper); |
gfx::ImageSkia cached_wallpaper; |
// Test that both user1 and user2's wallpaper can be found in cache. |
- EXPECT_TRUE(test_api->GetWallpaperFromCache(test_account_id_1.GetUserEmail(), |
- &cached_wallpaper)); |
- EXPECT_TRUE(test_api->GetWallpaperFromCache(test_account_id_2.GetUserEmail(), |
- &cached_wallpaper)); |
+ EXPECT_TRUE( |
+ test_api->GetWallpaperFromCache(test_account_id_1, &cached_wallpaper)); |
+ EXPECT_TRUE( |
+ test_api->GetWallpaperFromCache(test_account_id_2, &cached_wallpaper)); |
// Remove user2. |
fake_user_manager()->RemoveUserFromList(test_account_id_2); |
// Test that only user1's wallpaper can be found in cache. |
- EXPECT_TRUE(test_api->GetWallpaperFromCache(test_account_id_1.GetUserEmail(), |
- &cached_wallpaper)); |
- EXPECT_FALSE(test_api->GetWallpaperFromCache(test_account_id_2.GetUserEmail(), |
- &cached_wallpaper)); |
+ EXPECT_TRUE( |
+ test_api->GetWallpaperFromCache(test_account_id_1, &cached_wallpaper)); |
+ EXPECT_FALSE( |
+ test_api->GetWallpaperFromCache(test_account_id_2, &cached_wallpaper)); |
} |
} // namespace chromeos |