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

Side by Side Diff: athena/test/athena_test_helper.cc

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/test/athena_test_helper.h" 5 #include "athena/test/athena_test_helper.h"
6 6
7 #include "athena/env/public/athena_env.h" 7 #include "athena/env/public/athena_env.h"
8 #include "athena/extensions/public/extensions_delegate.h" 8 #include "athena/extensions/public/extensions_delegate.h"
9 #include "athena/main/athena_launcher.h" 9 #include "athena/main/athena_launcher.h"
10 #include "athena/test/sample_activity_factory.h" 10 #include "athena/test/sample_activity_factory.h"
(...skipping 30 matching lines...) Expand all
41 CHECK(setup_called_) << "AthenaTestHelper::SetUp() never called."; 41 CHECK(setup_called_) << "AthenaTestHelper::SetUp() never called.";
42 CHECK(teardown_called_) << "AthenaTestHelper::TearDown() never called."; 42 CHECK(teardown_called_) << "AthenaTestHelper::TearDown() never called.";
43 } 43 }
44 44
45 void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) { 45 void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
46 setup_called_ = true; 46 setup_called_ = true;
47 file_thread_.reset(new base::Thread("FileThread")); 47 file_thread_.reset(new base::Thread("FileThread"));
48 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); 48 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
49 file_thread_->StartWithOptions(options); 49 file_thread_->StartWithOptions(options);
50 50
51 chromeos::DBusThreadManager::InitializeWithStub(); 51 chromeos::DBusThreadManager::Initialize();
52 ui::InitializeInputMethodForTesting(); 52 ui::InitializeInputMethodForTesting();
53 aura::Env::CreateInstance(true); 53 aura::Env::CreateInstance(true);
54 aura::Env::GetInstance()->set_context_factory(context_factory); 54 aura::Env::GetInstance()->set_context_factory(context_factory);
55 55
56 // Unit tests generally don't want to query the system, rather use the state 56 // Unit tests generally don't want to query the system, rather use the state
57 // from RootWindow. 57 // from RootWindow.
58 aura::test::EnvTestHelper(aura::Env::GetInstance()) 58 aura::test::EnvTestHelper(aura::Env::GetInstance())
59 .SetInputStateLookup(scoped_ptr<aura::InputStateLookup>()); 59 .SetInputStateLookup(scoped_ptr<aura::InputStateLookup>());
60 60
61 athena::StartAthenaEnv(file_thread_->message_loop_proxy()); 61 athena::StartAthenaEnv(file_thread_->message_loop_proxy());
(...skipping 26 matching lines...) Expand all
88 88
89 void AthenaTestHelper::RunAllPendingInMessageLoop() { 89 void AthenaTestHelper::RunAllPendingInMessageLoop() {
90 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them 90 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
91 // use run_loop.QuitClosure(). 91 // use run_loop.QuitClosure().
92 base::RunLoop run_loop; 92 base::RunLoop run_loop;
93 run_loop.RunUntilIdle(); 93 run_loop.RunUntilIdle();
94 } 94 }
95 95
96 } // namespace test 96 } // namespace test
97 } // namespace athena 97 } // namespace athena
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698