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/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/main/athena_launcher.h" | 8 #include "athena/main/athena_launcher.h" |
8 #include "athena/screen/public/screen_manager.h" | 9 #include "athena/screen/public/screen_manager.h" |
9 #include "athena/test/sample_activity_factory.h" | 10 #include "athena/test/sample_activity_factory.h" |
10 #include "athena/test/test_app_model_builder.h" | 11 #include "athena/test/test_app_model_builder.h" |
11 #include "athena/test/test_screen_manager_delegate.h" | 12 #include "athena/test/test_screen_manager_delegate.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
16 #include "chromeos/dbus/dbus_thread_manager.h" | 17 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 root_window()->AddPreTargetHandler(focus_controller); | 90 root_window()->AddPreTargetHandler(focus_controller); |
90 aura::client::SetActivationClient(root_window(), focus_controller); | 91 aura::client::SetActivationClient(root_window(), focus_controller); |
91 focus_client_.reset(focus_controller); | 92 focus_client_.reset(focus_controller); |
92 | 93 |
93 root_window()->Show(); | 94 root_window()->Show(); |
94 // Ensure width != height so tests won't confuse them. | 95 // Ensure width != height so tests won't confuse them. |
95 host()->SetBounds(gfx::Rect(host_size)); | 96 host()->SetBounds(gfx::Rect(host_size)); |
96 | 97 |
97 athena::StartAthenaEnv(root_window(), screen_manager_delegate_.get(), | 98 athena::StartAthenaEnv(root_window(), screen_manager_delegate_.get(), |
98 file_thread_->message_loop_proxy()); | 99 file_thread_->message_loop_proxy()); |
| 100 athena::ExtensionsDelegate::CreateExtensionsDelegateForTest(); |
99 athena::StartAthenaSession(new SampleActivityFactory(), | 101 athena::StartAthenaSession(new SampleActivityFactory(), |
100 new TestAppModelBuilder()); | 102 new TestAppModelBuilder()); |
101 } | 103 } |
102 | 104 |
103 void AthenaTestHelper::TearDown() { | 105 void AthenaTestHelper::TearDown() { |
104 teardown_called_ = true; | 106 teardown_called_ = true; |
105 | 107 |
106 athena::ShutdownAthena(); | 108 athena::ShutdownAthena(); |
107 | 109 |
108 aura::client::SetFocusClient(root_window(), NULL); | 110 aura::client::SetFocusClient(root_window(), NULL); |
(...skipping 18 matching lines...) Expand all Loading... |
127 | 129 |
128 void AthenaTestHelper::RunAllPendingInMessageLoop() { | 130 void AthenaTestHelper::RunAllPendingInMessageLoop() { |
129 // 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 |
130 // use run_loop.QuitClosure(). | 132 // use run_loop.QuitClosure(). |
131 base::RunLoop run_loop; | 133 base::RunLoop run_loop; |
132 run_loop.RunUntilIdle(); | 134 run_loop.RunUntilIdle(); |
133 } | 135 } |
134 | 136 |
135 } // namespace test | 137 } // namespace test |
136 } // namespace athena | 138 } // namespace athena |
OLD | NEW |