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 8efb8de809e23e5ec696010850e237bad38dd420..6531c3f2b17d295169266ce61076a329b10e35e1 100644 |
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc |
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc |
@@ -27,6 +27,10 @@ |
#include "ui/compositor/test/context_factories_for_test.h" |
#endif |
+#if defined(USE_AURA) |
+#include "ui/views/corewm/wm_state.h" |
+#endif |
+ |
using content::BrowserThread; |
@@ -103,6 +107,9 @@ DesktopNotificationsTest::~DesktopNotificationsTest() { |
void DesktopNotificationsTest::SetUp() { |
ui::InitializeInputMethodForTesting(); |
+#if defined(USE_AURA) |
+ wm_state_.reset(new views::corewm::WMState); |
+#endif |
#if defined(USE_ASH) |
ui::ScopedAnimationDurationScaleMode normal_duration_mode( |
ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); |
@@ -116,7 +123,6 @@ void DesktopNotificationsTest::SetUp() { |
// So it is necessary to make sure the desktop gets created first. |
ash::Shell::CreateInstance(new ash::test::TestShellDelegate); |
#endif |
- |
chrome::RegisterLocalState(local_state_.registry()); |
profile_.reset(new TestingProfile()); |
ui_manager_.reset(new BalloonNotificationUIManager(&local_state_)); |
@@ -138,6 +144,9 @@ void DesktopNotificationsTest::TearDown() { |
aura::Env::DeleteInstance(); |
ui::TerminateContextFactoryForTests(); |
#endif |
+#if defined(USE_AURA) |
+ wm_state_.reset(); |
+#endif |
ui::ShutdownInputMethodForTesting(); |
} |