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/main/athena_launcher.h" | 7 #include "athena/main/athena_launcher.h" |
8 #include "athena/screen/public/screen_manager.h" | 8 #include "athena/screen/public/screen_manager.h" |
9 #include "athena/test/sample_activity_factory.h" | 9 #include "athena/test/sample_activity_factory.h" |
10 #include "athena/test/test_app_model_builder.h" | 10 #include "athena/test/test_app_model_builder.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 new wm::FocusController(ScreenManager::CreateFocusRules()); | 80 new wm::FocusController(ScreenManager::CreateFocusRules()); |
81 aura::client::SetFocusClient(root_window(), focus_controller); | 81 aura::client::SetFocusClient(root_window(), focus_controller); |
82 root_window()->AddPreTargetHandler(focus_controller); | 82 root_window()->AddPreTargetHandler(focus_controller); |
83 aura::client::SetActivationClient(root_window(), focus_controller); | 83 aura::client::SetActivationClient(root_window(), focus_controller); |
84 focus_client_.reset(focus_controller); | 84 focus_client_.reset(focus_controller); |
85 | 85 |
86 root_window()->Show(); | 86 root_window()->Show(); |
87 // Ensure width != height so tests won't confuse them. | 87 // Ensure width != height so tests won't confuse them. |
88 host()->SetBounds(gfx::Rect(host_size)); | 88 host()->SetBounds(gfx::Rect(host_size)); |
89 | 89 |
90 athena::StartAthena(root_window(), | 90 athena::StartAthenaEnv(root_window()); |
91 new SampleActivityFactory(), | 91 athena::StartAthenaSession(new SampleActivityFactory(), |
92 new TestAppModelBuilder()); | 92 new TestAppModelBuilder()); |
93 } | 93 } |
94 | 94 |
95 void AthenaTestHelper::TearDown() { | 95 void AthenaTestHelper::TearDown() { |
96 teardown_called_ = true; | 96 teardown_called_ = true; |
97 | 97 |
98 athena::ShutdownAthena(); | 98 athena::ShutdownAthena(); |
99 | 99 |
100 aura::client::SetFocusClient(root_window(), NULL); | 100 aura::client::SetFocusClient(root_window(), NULL); |
101 focus_client_.reset(); | 101 focus_client_.reset(); |
102 input_method_filter_.reset(); | 102 input_method_filter_.reset(); |
(...skipping 16 matching lines...) Expand all Loading... |
119 | 119 |
120 void AthenaTestHelper::RunAllPendingInMessageLoop() { | 120 void AthenaTestHelper::RunAllPendingInMessageLoop() { |
121 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 121 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
122 // use run_loop.QuitClosure(). | 122 // use run_loop.QuitClosure(). |
123 base::RunLoop run_loop; | 123 base::RunLoop run_loop; |
124 run_loop.RunUntilIdle(); | 124 run_loop.RunUntilIdle(); |
125 } | 125 } |
126 | 126 |
127 } // namespace test | 127 } // namespace test |
128 } // namespace athena | 128 } // namespace athena |
OLD | NEW |