Commit dd3f7778 authored by piman@chromium.org's avatar piman@chromium.org

aura/cc: Fix DesktopNotificationsTest

BUG=None
TEST=browser_tests --gtest_filter="DesktopNotificationsTest.*" with use_aura=1 and use_webkit_compositor=1 (in debug), verify no assert.


Review URL: http://codereview.chromium.org/8771057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113353 0039d316-1c4b-4281-b951-d872f2087c98
parent 2ad92706
......@@ -12,6 +12,9 @@
#include "content/public/common/show_desktop_notification_params.h"
#if defined(USE_AURA)
#if defined(USE_WEBKIT_COMPOSITOR)
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#endif
#include "ui/aura/root_window.h"
#endif
......@@ -89,6 +92,9 @@ DesktopNotificationsTest::~DesktopNotificationsTest() {
void DesktopNotificationsTest::SetUp() {
#if defined(USE_AURA)
#if defined(USE_WEBKIT_COMPOSITOR)
WebKit::initialize(&webkit_platform_support_);
#endif
// MockBalloonCollection retrieves information about the screen on creation.
// So it is necessary to make sure the desktop gets created first.
aura::RootWindow::GetInstance();
......@@ -107,6 +113,12 @@ void DesktopNotificationsTest::TearDown() {
service_.reset(NULL);
ui_manager_.reset(NULL);
profile_.reset(NULL);
#if defined(USE_AURA)
aura::RootWindow::DeleteInstance();
#if defined(USE_WEBKIT_COMPOSITOR)
WebKit::shutdown();
#endif
#endif
}
content::ShowDesktopNotificationHostMsgParams
......
......@@ -20,6 +20,10 @@
#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(USE_AURA) && defined(USE_WEBKIT_COMPOSITOR)
#include "content/test/render_view_test.h"
#endif
class DesktopNotificationsTest;
typedef LoggingNotificationDelegate<DesktopNotificationsTest>
LoggingNotificationProxy;
......@@ -113,6 +117,11 @@ class DesktopNotificationsTest : public testing::Test {
// Real DesktopNotificationService
scoped_ptr<DesktopNotificationService> service_;
#if defined(USE_AURA) && defined(USE_WEBKIT_COMPOSITOR)
content::RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox
webkit_platform_support_;
#endif
// Contains the cumulative output of the unit test.
static std::string log_output_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment