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_base.h" | 5 #include "ui/aura/test/aura_test_base.h" |
6 | 6 |
7 #include "ui/aura/client/window_tree_client.h" | 7 #include "ui/aura/client/window_tree_client.h" |
8 #include "ui/aura/root_window.h" | 8 #include "ui/aura/root_window.h" |
9 #include "ui/aura/test/aura_test_helper.h" | 9 #include "ui/aura/test/aura_test_helper.h" |
10 #include "ui/aura/test/test_window_delegate.h" | 10 #include "ui/aura/test/test_window_delegate.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 ui::ShutdownInputMethodForTesting(); | 83 ui::ShutdownInputMethodForTesting(); |
84 testing::Test::TearDown(); | 84 testing::Test::TearDown(); |
85 } | 85 } |
86 | 86 |
87 Window* AuraTestBase::CreateNormalWindow(int id, Window* parent, | 87 Window* AuraTestBase::CreateNormalWindow(int id, Window* parent, |
88 WindowDelegate* delegate) { | 88 WindowDelegate* delegate) { |
89 Window* window = new Window( | 89 Window* window = new Window( |
90 delegate ? delegate : | 90 delegate ? delegate : |
91 test::TestWindowDelegate::CreateSelfDestroyingDelegate()); | 91 test::TestWindowDelegate::CreateSelfDestroyingDelegate()); |
92 window->set_id(id); | 92 window->set_id(id); |
93 window->Init(ui::LAYER_TEXTURED); | 93 window->Init(aura::WINDOW_LAYER_TEXTURED); |
94 parent->AddChild(window); | 94 parent->AddChild(window); |
95 window->SetBounds(gfx::Rect(0, 0, 100, 100)); | 95 window->SetBounds(gfx::Rect(0, 0, 100, 100)); |
96 window->Show(); | 96 window->Show(); |
97 return window; | 97 return window; |
98 } | 98 } |
99 | 99 |
100 void AuraTestBase::RunAllPendingInMessageLoop() { | 100 void AuraTestBase::RunAllPendingInMessageLoop() { |
101 helper_->RunAllPendingInMessageLoop(); | 101 helper_->RunAllPendingInMessageLoop(); |
102 } | 102 } |
103 | 103 |
104 void AuraTestBase::ParentWindow(Window* window) { | 104 void AuraTestBase::ParentWindow(Window* window) { |
105 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); | 105 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); |
106 } | 106 } |
107 | 107 |
108 } // namespace test | 108 } // namespace test |
109 } // namespace aura | 109 } // namespace aura |
OLD | NEW |