OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/test/aura_test_helper.h" | 5 #include "ui/aura/test/aura_test_helper.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/client/default_activation_client.h" | 10 #include "ui/aura/client/default_activation_client.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 activation_client_.reset( | 86 activation_client_.reset( |
87 new client::DefaultActivationClient(root_window())); | 87 new client::DefaultActivationClient(root_window())); |
88 capture_client_.reset(new client::DefaultCaptureClient(root_window())); | 88 capture_client_.reset(new client::DefaultCaptureClient(root_window())); |
89 test_input_method_.reset(new ui::DummyInputMethod); | 89 test_input_method_.reset(new ui::DummyInputMethod); |
90 root_window()->SetProperty( | 90 root_window()->SetProperty( |
91 client::kRootWindowInputMethodKey, | 91 client::kRootWindowInputMethodKey, |
92 test_input_method_.get()); | 92 test_input_method_.get()); |
93 | 93 |
94 root_window()->Show(); | 94 root_window()->Show(); |
95 // Ensure width != height so tests won't confuse them. | 95 // Ensure width != height so tests won't confuse them. |
96 dispatcher()->SetHostSize(gfx::Size(800, 600)); | 96 dispatcher()->host()->SetBounds(gfx::Rect(800, 600)); |
97 } | 97 } |
98 | 98 |
99 void AuraTestHelper::TearDown() { | 99 void AuraTestHelper::TearDown() { |
100 teardown_called_ = true; | 100 teardown_called_ = true; |
101 test_input_method_.reset(); | 101 test_input_method_.reset(); |
102 stacking_client_.reset(); | 102 stacking_client_.reset(); |
103 activation_client_.reset(); | 103 activation_client_.reset(); |
104 capture_client_.reset(); | 104 capture_client_.reset(); |
105 focus_client_.reset(); | 105 focus_client_.reset(); |
106 client::SetFocusClient(root_window(), NULL); | 106 client::SetFocusClient(root_window(), NULL); |
(...skipping 14 matching lines...) Expand all Loading... |
121 | 121 |
122 void AuraTestHelper::RunAllPendingInMessageLoop() { | 122 void AuraTestHelper::RunAllPendingInMessageLoop() { |
123 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 123 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
124 // use run_loop.QuitClosure(). | 124 // use run_loop.QuitClosure(). |
125 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); | 125 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); |
126 run_loop.RunUntilIdle(); | 126 run_loop.RunUntilIdle(); |
127 } | 127 } |
128 | 128 |
129 } // namespace test | 129 } // namespace test |
130 } // namespace aura | 130 } // namespace aura |
OLD | NEW |