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

Unified Diff: chrome/browser/sync/sync_error_notifier_ash_unittest.cc

Issue 845373002: Change default code flag to NewAvatarMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test comment. GetAvatarIcon's no longer const. Created 5 years, 9 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
Index: chrome/browser/sync/sync_error_notifier_ash_unittest.cc
diff --git a/chrome/browser/sync/sync_error_notifier_ash_unittest.cc b/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
index 8de7117f978b8907f7ef49111539992f3cde5f7e..5cc84686240f47bf8178b685394703708d34f6bb 100644
--- a/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
+++ b/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
@@ -5,10 +5,13 @@
#include "chrome/browser/sync/sync_error_notifier_ash.h"
#include "ash/test/ash_test_base.h"
+#include "base/files/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
+#include "chrome/browser/profiles/profile_avatar_icon_util.h"
+#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/browser/sync/sync_error_controller.h"
#include "chrome/browser/ui/browser.h"
@@ -100,6 +103,16 @@ class SyncErrorNotifierTest : public AshTestBase {
profile_ = profile_manager_->CreateTestingProfile(kTestAccountId);
+#if !defined(OS_CHROMEOS)
+ // Preload the desktop avatar icon so it's cached for the test's execution.
+ ProfileInfoCache& cache = *profile_manager_->profile_info_cache();
+ size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
+ cache.GetAvatarIconOfProfileAtIndex(index);
+ base::MessageLoop::current()->RunUntilIdle();
+ ASSERT_TRUE(base::PathExists(profiles::GetPathOfHighResAvatarAtIndex(
+ cache.GetAvatarIconIndexOfProfileAtIndex(index))));
+#endif
+
TestingBrowserProcess::GetGlobal();
AshTestBase::SetUp();

Powered by Google App Engine
This is Rietveld 408576698