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/test/sample_activity_factory.h" | 8 #include "athena/test/sample_activity_factory.h" |
| 9 #include "athena/test/test_app_model_builder.h" |
9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
11 #include "ui/aura/client/aura_constants.h" | 12 #include "ui/aura/client/aura_constants.h" |
12 #include "ui/aura/env.h" | 13 #include "ui/aura/env.h" |
13 #include "ui/aura/input_state_lookup.h" | 14 #include "ui/aura/input_state_lookup.h" |
14 #include "ui/aura/test/env_test_helper.h" | 15 #include "ui/aura/test/env_test_helper.h" |
15 #include "ui/aura/test/test_focus_client.h" | 16 #include "ui/aura/test/test_focus_client.h" |
16 #include "ui/aura/test/test_screen.h" | 17 #include "ui/aura/test/test_screen.h" |
17 #include "ui/aura/window_event_dispatcher.h" | 18 #include "ui/aura/window_event_dispatcher.h" |
18 #include "ui/base/ime/input_method_initializer.h" | 19 #include "ui/base/ime/input_method_initializer.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // TODO(oshima): Switch to athena implementation. | 68 // TODO(oshima): Switch to athena implementation. |
68 focus_client_.reset(new aura::test::TestFocusClient); | 69 focus_client_.reset(new aura::test::TestFocusClient); |
69 aura::client::SetFocusClient(root_window(), | 70 aura::client::SetFocusClient(root_window(), |
70 focus_client_.get()); | 71 focus_client_.get()); |
71 new ::wm::DefaultActivationClient(root_window()); | 72 new ::wm::DefaultActivationClient(root_window()); |
72 | 73 |
73 root_window()->Show(); | 74 root_window()->Show(); |
74 // Ensure width != height so tests won't confuse them. | 75 // Ensure width != height so tests won't confuse them. |
75 host()->SetBounds(gfx::Rect(800, 600)); | 76 host()->SetBounds(gfx::Rect(800, 600)); |
76 | 77 |
77 athena::StartAthena(root_window(), new SampleActivityFactory()); | 78 athena::StartAthena(root_window(), |
| 79 new SampleActivityFactory(), |
| 80 new TestAppModelBuilder()); |
78 } | 81 } |
79 | 82 |
80 void AthenaTestHelper::TearDown() { | 83 void AthenaTestHelper::TearDown() { |
81 teardown_called_ = true; | 84 teardown_called_ = true; |
82 | 85 |
83 athena::ShutdownAthena(); | 86 athena::ShutdownAthena(); |
84 | 87 |
85 aura::client::SetFocusClient(root_window(), NULL); | 88 aura::client::SetFocusClient(root_window(), NULL); |
86 focus_client_.reset(); | 89 focus_client_.reset(); |
87 input_method_filter_.reset(); | 90 input_method_filter_.reset(); |
(...skipping 14 matching lines...) Expand all Loading... |
102 | 105 |
103 void AthenaTestHelper::RunAllPendingInMessageLoop() { | 106 void AthenaTestHelper::RunAllPendingInMessageLoop() { |
104 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 107 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
105 // use run_loop.QuitClosure(). | 108 // use run_loop.QuitClosure(). |
106 base::RunLoop run_loop; | 109 base::RunLoop run_loop; |
107 run_loop.RunUntilIdle(); | 110 run_loop.RunUntilIdle(); |
108 } | 111 } |
109 | 112 |
110 } // namespace test | 113 } // namespace test |
111 } // namespace athena | 114 } // namespace athena |
OLD | NEW |