| 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 #ifndef ATHENA_TEST_ATHENA_TEST_HELPER_H_ | 5 #ifndef ATHENA_TEST_ATHENA_TEST_HELPER_H_ |
| 6 #define ATHENA_TEST_ATHENA_TEST_HELPER_H_ | 6 #define ATHENA_TEST_ATHENA_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class FocusClient; | 26 class FocusClient; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace wm { | 30 namespace wm { |
| 31 class InputMethodEventFilter; | 31 class InputMethodEventFilter; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace athena { | 34 namespace athena { |
| 35 namespace test { | 35 namespace test { |
| 36 class TestScreenManagerDelegate; |
| 36 | 37 |
| 37 // A helper class owned by tests that does common initialization required for | 38 // A helper class owned by tests that does common initialization required for |
| 38 // Athena use. This class creates a root window with clients and other objects | 39 // Athena use. This class creates a root window with clients and other objects |
| 39 // that are necessary to run test on Athena. | 40 // that are necessary to run test on Athena. |
| 40 class AthenaTestHelper { | 41 class AthenaTestHelper { |
| 41 public: | 42 public: |
| 42 explicit AthenaTestHelper(base::MessageLoopForUI* message_loop); | 43 explicit AthenaTestHelper(base::MessageLoopForUI* message_loop); |
| 43 ~AthenaTestHelper(); | 44 ~AthenaTestHelper(); |
| 44 | 45 |
| 45 // Creates and initializes (shows and sizes) the RootWindow for use in tests. | 46 // Creates and initializes (shows and sizes) the RootWindow for use in tests. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 56 aura::WindowTreeHost* host() { return host_.get(); } | 57 aura::WindowTreeHost* host() { return host_.get(); } |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 bool setup_called_; | 60 bool setup_called_; |
| 60 bool teardown_called_; | 61 bool teardown_called_; |
| 61 | 62 |
| 62 base::MessageLoopForUI* message_loop_; | 63 base::MessageLoopForUI* message_loop_; |
| 63 | 64 |
| 64 scoped_ptr<aura::WindowTreeHost> host_; | 65 scoped_ptr<aura::WindowTreeHost> host_; |
| 65 scoped_ptr<aura::TestScreen> test_screen_; | 66 scoped_ptr<aura::TestScreen> test_screen_; |
| 67 scoped_ptr<TestScreenManagerDelegate> screen_manager_delegate_; |
| 66 scoped_ptr<aura::client::FocusClient> focus_client_; | 68 scoped_ptr<aura::client::FocusClient> focus_client_; |
| 67 scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_; | 69 scoped_ptr< ::wm::InputMethodEventFilter> input_method_filter_; |
| 68 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; | 70 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; |
| 69 | 71 |
| 70 DISALLOW_COPY_AND_ASSIGN(AthenaTestHelper); | 72 DISALLOW_COPY_AND_ASSIGN(AthenaTestHelper); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace test | 75 } // namespace test |
| 74 } // namespace athena | 76 } // namespace athena |
| 75 | 77 |
| 76 #endif // ATHENA_TEST_ATHENA_TEST_HELPER_H_ | 78 #endif // ATHENA_TEST_ATHENA_TEST_HELPER_H_ |
| OLD | NEW |