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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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::StartAthena(root_window(), |
91 NULL, | |
oshima
2014/08/14 00:19:03
Can you add impl and add test for this?
| |
91 new SampleActivityFactory(), | 92 new SampleActivityFactory(), |
92 new TestAppModelBuilder()); | 93 new TestAppModelBuilder()); |
93 } | 94 } |
94 | 95 |
95 void AthenaTestHelper::TearDown() { | 96 void AthenaTestHelper::TearDown() { |
96 teardown_called_ = true; | 97 teardown_called_ = true; |
97 | 98 |
98 athena::ShutdownAthena(); | 99 athena::ShutdownAthena(); |
99 | 100 |
100 aura::client::SetFocusClient(root_window(), NULL); | 101 aura::client::SetFocusClient(root_window(), NULL); |
(...skipping 18 matching lines...) Expand all Loading... | |
119 | 120 |
120 void AthenaTestHelper::RunAllPendingInMessageLoop() { | 121 void AthenaTestHelper::RunAllPendingInMessageLoop() { |
121 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 122 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
122 // use run_loop.QuitClosure(). | 123 // use run_loop.QuitClosure(). |
123 base::RunLoop run_loop; | 124 base::RunLoop run_loop; |
124 run_loop.RunUntilIdle(); | 125 run_loop.RunUntilIdle(); |
125 } | 126 } |
126 | 127 |
127 } // namespace test | 128 } // namespace test |
128 } // namespace athena | 129 } // namespace athena |
OLD | NEW |