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

Unified Diff: chrome/browser/notifications/desktop_notifications_unittest.cc

Issue 8573033: aura: Make sure the desktop is initialized when creating a DefaultMonitorInfoProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/desktop_notifications_unittest.cc
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.cc b/chrome/browser/notifications/desktop_notifications_unittest.cc
index b3470cdffbb8998694149c0e443848059aef1d9c..4f1a09bf81370fdbb0d757902df18eb26248cafc 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc
@@ -11,6 +11,10 @@
#include "chrome/test/base/testing_pref_service.h"
#include "content/public/common/show_desktop_notification_params.h"
+#if defined(USE_AURA)
+#include "ui/aura/desktop.h"
+#endif
+
using content::BrowserThread;
// static
@@ -84,6 +88,12 @@ DesktopNotificationsTest::~DesktopNotificationsTest() {
}
void DesktopNotificationsTest::SetUp() {
+#if defined(USE_AURA)
+ // MockBalloonCollection retrieves information about the screen on creation.
+ // So it is necessary to make sure the desktop gets created first.
+ aura::Desktop::GetInstance();
+#endif
+
browser::RegisterLocalState(&local_state_);
profile_.reset(new TestingProfile());
balloon_collection_ = new MockBalloonCollection();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698