| 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/base/athena_test_base.h" | 5 #include "athena/test/base/athena_test_base.h" |
| 6 | 6 |
| 7 #include "athena/env/public/athena_env.h" | 7 #include "athena/env/public/athena_env.h" |
| 8 #include "athena/screen/public/screen_manager.h" |
| 8 #include "athena/test/base/athena_test_helper.h" | 9 #include "athena/test/base/athena_test_helper.h" |
| 10 #include "ui/aura/client/window_tree_client.h" |
| 9 #include "ui/aura/test/event_generator_delegate_aura.h" | 11 #include "ui/aura/test/event_generator_delegate_aura.h" |
| 12 #include "ui/aura/window.h" |
| 10 #include "ui/compositor/test/context_factories_for_test.h" | 13 #include "ui/compositor/test/context_factories_for_test.h" |
| 11 | 14 |
| 12 #if defined(USE_X11) | 15 #if defined(USE_X11) |
| 13 #include "ui/aura/window_tree_host_x11.h" | 16 #include "ui/aura/window_tree_host_x11.h" |
| 14 #endif | 17 #endif |
| 15 | 18 |
| 16 namespace athena { | 19 namespace athena { |
| 17 namespace test { | 20 namespace test { |
| 18 | 21 |
| 19 AthenaTestBase::AthenaTestBase() | 22 AthenaTestBase::AthenaTestBase() |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 58 |
| 56 helper_->TearDown(); | 59 helper_->TearDown(); |
| 57 ui::TerminateContextFactoryForTests(); | 60 ui::TerminateContextFactoryForTests(); |
| 58 testing::Test::TearDown(); | 61 testing::Test::TearDown(); |
| 59 } | 62 } |
| 60 | 63 |
| 61 void AthenaTestBase::RunAllPendingInMessageLoop() { | 64 void AthenaTestBase::RunAllPendingInMessageLoop() { |
| 62 helper_->RunAllPendingInMessageLoop(); | 65 helper_->RunAllPendingInMessageLoop(); |
| 63 } | 66 } |
| 64 | 67 |
| 68 scoped_ptr<aura::Window> AthenaTestBase::CreateTestWindow( |
| 69 aura::WindowDelegate* delegate, |
| 70 const gfx::Rect& bounds) { |
| 71 scoped_ptr<aura::Window> window(new aura::Window(delegate)); |
| 72 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 73 window->Init(aura::WINDOW_LAYER_SOLID_COLOR); |
| 74 aura::client::ParentWindowWithContext( |
| 75 window.get(), ScreenManager::Get()->GetContext(), bounds); |
| 76 return window.Pass(); |
| 77 } |
| 78 |
| 65 } // namespace test | 79 } // namespace test |
| 66 } // namespace athena | 80 } // namespace athena |
| OLD | NEW |