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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ | 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_ |
6 #define ASH_TEST_ASH_TEST_BASE_H_ | 6 #define ASH_TEST_ASH_TEST_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 | 88 |
89 // Attach |window| to the current shell's root window. | 89 // Attach |window| to the current shell's root window. |
90 void SetDefaultParentByPrimaryRootWindow(aura::Window* window); | 90 void SetDefaultParentByPrimaryRootWindow(aura::Window* window); |
91 | 91 |
92 // Returns the EventGenerator that uses screen coordinates and works | 92 // Returns the EventGenerator that uses screen coordinates and works |
93 // across multiple displays. It createse a new generator if it | 93 // across multiple displays. It createse a new generator if it |
94 // hasn't been created yet. | 94 // hasn't been created yet. |
95 aura::test::EventGenerator& GetEventGenerator(); | 95 aura::test::EventGenerator& GetEventGenerator(); |
96 | 96 |
97 protected: | 97 protected: |
98 static bool SupportsMultipleDisplays(); | |
James Cook
2013/06/11 17:48:07
Needs function comment.
oshima
2013/06/12 00:12:12
Done.
| |
99 | |
98 void RunAllPendingInMessageLoop(); | 100 void RunAllPendingInMessageLoop(); |
99 | 101 |
100 // Utility methods to emulate user logged in or not, session started or not | 102 // Utility methods to emulate user logged in or not, session started or not |
101 // and user able to lock screen or not cases. | 103 // and user able to lock screen or not cases. |
102 void SetSessionStarted(bool session_started); | 104 void SetSessionStarted(bool session_started); |
103 void SetUserLoggedIn(bool user_logged_in); | 105 void SetUserLoggedIn(bool user_logged_in); |
104 void SetCanLockScreen(bool can_lock_screen); | 106 void SetCanLockScreen(bool can_lock_screen); |
105 | 107 |
106 private: | 108 private: |
107 bool setup_called_; | 109 bool setup_called_; |
108 bool teardown_called_; | 110 bool teardown_called_; |
109 base::MessageLoopForUI message_loop_; | 111 base::MessageLoopForUI message_loop_; |
110 scoped_ptr<AshTestHelper> ash_test_helper_; | 112 scoped_ptr<AshTestHelper> ash_test_helper_; |
111 scoped_ptr<aura::test::EventGenerator> event_generator_; | 113 scoped_ptr<aura::test::EventGenerator> event_generator_; |
112 #if defined(OS_WIN) | 114 #if defined(OS_WIN) |
113 // Note that the order is important here as ipc_thread_ should be destroyed | 115 // Note that the order is important here as ipc_thread_ should be destroyed |
114 // after metro_viewer_host_->channel_. | 116 // after metro_viewer_host_->channel_. |
115 scoped_ptr<base::Thread> ipc_thread_; | 117 scoped_ptr<base::Thread> ipc_thread_; |
116 scoped_ptr<TestMetroViewerProcessHost> metro_viewer_host_; | 118 scoped_ptr<TestMetroViewerProcessHost> metro_viewer_host_; |
117 ui::ScopedOleInitializer ole_initializer_; | 119 ui::ScopedOleInitializer ole_initializer_; |
118 #endif | 120 #endif |
119 | 121 |
120 DISALLOW_COPY_AND_ASSIGN(AshTestBase); | 122 DISALLOW_COPY_AND_ASSIGN(AshTestBase); |
121 }; | 123 }; |
122 | 124 |
123 } // namespace test | 125 } // namespace test |
124 } // namespace ash | 126 } // namespace ash |
125 | 127 |
126 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 128 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |