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

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, 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 unified diff | Download patch | Annotate | Revision Log
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/extensions/public/extensions_delegate.h" 7 #include "athena/extensions/public/extensions_delegate.h"
8 #include "athena/main/athena_launcher.h" 8 #include "athena/main/athena_launcher.h"
9 #include "athena/screen/public/screen_manager.h" 9 #include "athena/screen/public/screen_manager.h"
10 #include "athena/test/sample_activity_factory.h" 10 #include "athena/test/sample_activity_factory.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) { 53 void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
54 setup_called_ = true; 54 setup_called_ = true;
55 file_thread_.reset(new base::Thread("FileThread")); 55 file_thread_.reset(new base::Thread("FileThread"));
56 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); 56 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
57 file_thread_->StartWithOptions(options); 57 file_thread_->StartWithOptions(options);
58 58
59 // Force showing in the experimental app-list view. 59 // Force showing in the experimental app-list view.
60 base::CommandLine::ForCurrentProcess()->AppendSwitch( 60 base::CommandLine::ForCurrentProcess()->AppendSwitch(
61 app_list::switches::kEnableExperimentalAppList); 61 app_list::switches::kEnableExperimentalAppList);
62 62
63 chromeos::DBusThreadManager::InitializeWithStub(); 63 chromeos::DBusThreadManager::Initialize();
64 64
65 aura::Env::CreateInstance(true); 65 aura::Env::CreateInstance(true);
66 aura::Env::GetInstance()->set_context_factory(context_factory); 66 aura::Env::GetInstance()->set_context_factory(context_factory);
67 67
68 // Unit tests generally don't want to query the system, rather use the state 68 // Unit tests generally don't want to query the system, rather use the state
69 // from RootWindow. 69 // from RootWindow.
70 aura::test::EnvTestHelper(aura::Env::GetInstance()) 70 aura::test::EnvTestHelper(aura::Env::GetInstance())
71 .SetInputStateLookup(scoped_ptr<aura::InputStateLookup>()); 71 .SetInputStateLookup(scoped_ptr<aura::InputStateLookup>());
72 72
73 ui::InitializeInputMethodForTesting(); 73 ui::InitializeInputMethodForTesting();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 void AthenaTestHelper::RunAllPendingInMessageLoop() { 130 void AthenaTestHelper::RunAllPendingInMessageLoop() {
131 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them 131 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
132 // use run_loop.QuitClosure(). 132 // use run_loop.QuitClosure().
133 base::RunLoop run_loop; 133 base::RunLoop run_loop;
134 run_loop.RunUntilIdle(); 134 run_loop.RunUntilIdle();
135 } 135 }
136 136
137 } // namespace test 137 } // namespace test
138 } // namespace athena 138 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698