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

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

Issue 105813013: Adds views::corewm::WMState to install common state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix viewseventtestbase Created 7 years 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/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();
}

Powered by Google App Engine
This is Rietveld 408576698