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

Unified Diff: athena/test/athena_test_helper.cc

Issue 490033003: Fixes three crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add file thread Created 6 years, 4 months 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 | « athena/test/athena_test_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/test/athena_test_helper.cc
diff --git a/athena/test/athena_test_helper.cc b/athena/test/athena_test_helper.cc
index 6a9121aa54f431a421b9d7423574aefd112788e0..b65abc0dbe0bcdceb4002eb0ab0e0283e3064fc6 100644
--- a/athena/test/athena_test_helper.cc
+++ b/athena/test/athena_test_helper.cc
@@ -12,6 +12,7 @@
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/threading/thread.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/aura/client/aura_constants.h"
@@ -50,6 +51,9 @@ AthenaTestHelper::~AthenaTestHelper() {
void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
setup_called_ = true;
+ file_thread_.reset(new base::Thread("FileThread"));
+ base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
+ file_thread_->StartWithOptions(options);
// Force showing in the experimental app-list view.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
@@ -90,7 +94,8 @@ void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
// Ensure width != height so tests won't confuse them.
host()->SetBounds(gfx::Rect(host_size));
- athena::StartAthenaEnv(root_window(), screen_manager_delegate_.get());
+ athena::StartAthenaEnv(root_window(), screen_manager_delegate_.get(),
+ file_thread_->message_loop_proxy());
athena::StartAthenaSession(new SampleActivityFactory(),
new TestAppModelBuilder());
}
« no previous file with comments | « athena/test/athena_test_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698