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

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

Issue 574113002: Use chromeos accelerometer reader and support only lid accelerometer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use BlockingPool for athena and fix nit. 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
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/public/athena_launcher.h" 9 #include "athena/main/public/athena_launcher.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 chromeos::NetworkHandler::Initialize(); 53 chromeos::NetworkHandler::Initialize();
54 ui::InitializeInputMethodForTesting(); 54 ui::InitializeInputMethodForTesting();
55 aura::Env::CreateInstance(true); 55 aura::Env::CreateInstance(true);
56 aura::Env::GetInstance()->set_context_factory(context_factory); 56 aura::Env::GetInstance()->set_context_factory(context_factory);
57 57
58 // Unit tests generally don't want to query the system, rather use the state 58 // Unit tests generally don't want to query the system, rather use the state
59 // from RootWindow. 59 // from RootWindow.
60 aura::test::EnvTestHelper(aura::Env::GetInstance()) 60 aura::test::EnvTestHelper(aura::Env::GetInstance())
61 .SetInputStateLookup(scoped_ptr<aura::InputStateLookup>()); 61 .SetInputStateLookup(scoped_ptr<aura::InputStateLookup>());
62 62
63 // TODO(oshima): Use a BlockingPool task runner.
oshima 2014/09/16 22:33:04 You may leave the comment, but I think this is ok
63 athena::StartAthenaEnv(file_thread_->message_loop_proxy()); 64 athena::StartAthenaEnv(file_thread_->message_loop_proxy());
64 athena::ExtensionsDelegate::CreateExtensionsDelegateForTest(); 65 athena::ExtensionsDelegate::CreateExtensionsDelegateForTest();
65 athena::StartAthenaSession(new SampleActivityFactory(), 66 athena::StartAthenaSession(new SampleActivityFactory(),
66 new TestAppModelBuilder()); 67 new TestAppModelBuilder());
67 } 68 }
68 69
69 void AthenaTestHelper::TearDown() { 70 void AthenaTestHelper::TearDown() {
70 teardown_called_ = true; 71 teardown_called_ = true;
71 72
72 athena::ShutdownAthena(); 73 athena::ShutdownAthena();
(...skipping 18 matching lines...) Expand all
91 92
92 void AthenaTestHelper::RunAllPendingInMessageLoop() { 93 void AthenaTestHelper::RunAllPendingInMessageLoop() {
93 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them 94 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
94 // use run_loop.QuitClosure(). 95 // use run_loop.QuitClosure().
95 base::RunLoop run_loop; 96 base::RunLoop run_loop;
96 run_loop.RunUntilIdle(); 97 run_loop.RunUntilIdle();
97 } 98 }
98 99
99 } // namespace test 100 } // namespace test
100 } // namespace athena 101 } // namespace athena
OLDNEW
« no previous file with comments | « athena/system/system_ui_impl.cc ('k') | chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698