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

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

Issue 11416145: desktop notification test setup: valid ShellDelegate, create ActiveDesktopMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/notifications/desktop_notifications_unittest.h ('k') | chrome/chrome_tests.gypi » ('j') | 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 4a96e9f7eac0611bd7759f9a9614bca3a2ad7311..6e5c308d96d4a2258bd396dd597cc03d421a6804 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc
@@ -12,8 +12,10 @@
#include "chrome/test/base/testing_pref_service.h"
#include "content/public/common/show_desktop_notification_params.h"
-#if defined(USE_AURA)
+#if defined(USE_ASH)
#include "ash/shell.h"
+#include "ash/test/test_shell_delegate.h"
+#include "chrome/browser/ui/aura/active_desktop_monitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
@@ -96,7 +98,8 @@ void DesktopNotificationsTest::SetUp() {
WebKit::initialize(webkit_platform_support_.Get());
// MockBalloonCollection retrieves information about the screen on creation.
// So it is necessary to make sure the desktop gets created first.
- ash::Shell::CreateInstance(NULL);
+ ash::Shell::CreateInstance(new ash::test::TestShellDelegate);
+ active_desktop_monitor_.reset(new ActiveDesktopMonitor);
#endif
chrome::RegisterLocalState(&local_state_);
@@ -113,6 +116,7 @@ void DesktopNotificationsTest::TearDown() {
ui_manager_.reset(NULL);
profile_.reset(NULL);
#if defined(USE_ASH)
+ active_desktop_monitor_.reset();
ash::Shell::DeleteInstance();
aura::Env::DeleteInstance();
WebKit::shutdown();
« no previous file with comments | « chrome/browser/notifications/desktop_notifications_unittest.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698