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

Unified Diff: chrome/test/base/view_event_test_base.cc

Issue 8937007: Initialize shell and browser thread for views event tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: consolidated ui_thread in bookmark test and vieweventtestbase Created 9 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
« no previous file with comments | « chrome/test/base/view_event_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/view_event_test_base.cc
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc
index 91ab67be28d23dd93a65e142a83d17759e2350a5..b00ce6a620e1b918a0f09c0afa12ebcded041eac 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -15,12 +15,14 @@
#include "base/string_number_conversions.h"
#include "chrome/browser/automation/ui_controls.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/browser_thread.h"
#include "ui/gfx/compositor/test/compositor_test_support.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
#if defined(USE_AURA)
#include "ui/aura/root_window.h"
+#include "ui/aura_shell/shell.h"
#endif
namespace {
@@ -60,6 +62,7 @@ const int kMouseMoveDelayMS = 200;
ViewEventTestBase::ViewEventTestBase()
: window_(NULL),
content_view_(NULL),
+ ui_thread_(content::BrowserThread::UI, &message_loop_),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
}
@@ -89,6 +92,7 @@ void ViewEventTestBase::SetUp() {
ui::CompositorTestSupport::Initialize();
#if defined(USE_AURA)
aura::RootWindow::GetInstance();
+ aura_shell::Shell::CreateInstance(NULL);
#endif
window_ = views::Widget::CreateWindow(this);
}
@@ -104,6 +108,7 @@ void ViewEventTestBase::TearDown() {
window_ = NULL;
}
#if defined(USE_AURA)
+ aura_shell::Shell::DeleteInstance();
aura::RootWindow::DeleteInstance();
#endif
ui::CompositorTestSupport::Terminate();
« no previous file with comments | « chrome/test/base/view_event_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698