OLD | NEW |
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/base/athena_test_helper.h" | 5 #include "athena/test/base/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/apps_search_controller_factory.h" | 8 #include "athena/extensions/public/apps_search_controller_factory.h" |
9 #include "athena/extensions/public/extensions_delegate.h" | 9 #include "athena/extensions/public/extensions_delegate.h" |
10 #include "athena/home/public/search_controller_factory.h" | 10 #include "athena/home/public/search_controller_factory.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 63 // TODO(oshima): Use a BlockingPool task runner. |
64 athena::StartAthenaEnv(file_thread_->message_loop_proxy()); | 64 athena::StartAthenaEnv(file_thread_->message_loop_proxy()); |
65 athena::ExtensionsDelegate::CreateExtensionsDelegateForTest(); | 65 athena::ExtensionsDelegate::CreateExtensionsDelegateForTest(); |
66 athena::StartAthenaSession(new SampleActivityFactory(), | 66 athena::StartAthenaSession(new SampleActivityFactory(), |
67 make_scoped_ptr(new TestAppModelBuilder()), | 67 make_scoped_ptr(new TestAppModelBuilder()), |
68 CreateSearchControllerFactory(NULL)); | 68 CreateSearchControllerFactory(nullptr)); |
69 } | 69 } |
70 | 70 |
71 void AthenaTestHelper::TearDown() { | 71 void AthenaTestHelper::TearDown() { |
72 teardown_called_ = true; | 72 teardown_called_ = true; |
73 | 73 |
74 athena::ShutdownAthena(); | 74 athena::ShutdownAthena(); |
75 aura::Env::DeleteInstance(); | 75 aura::Env::DeleteInstance(); |
76 | 76 |
77 #if defined(USE_X11) | 77 #if defined(USE_X11) |
78 ui::test::ResetXCursorCache(); | 78 ui::test::ResetXCursorCache(); |
(...skipping 13 matching lines...) Expand all Loading... |
92 | 92 |
93 void AthenaTestHelper::RunAllPendingInMessageLoop() { | 93 void AthenaTestHelper::RunAllPendingInMessageLoop() { |
94 // 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 |
95 // use run_loop.QuitClosure(). | 95 // use run_loop.QuitClosure(). |
96 base::RunLoop run_loop; | 96 base::RunLoop run_loop; |
97 run_loop.RunUntilIdle(); | 97 run_loop.RunUntilIdle(); |
98 } | 98 } |
99 | 99 |
100 } // namespace test | 100 } // namespace test |
101 } // namespace athena | 101 } // namespace athena |
OLD | NEW |