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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Methods to emulate blocking and unblocking user session with given | 132 // Methods to emulate blocking and unblocking user session with given |
133 // |block_reason|. | 133 // |block_reason|. |
134 void BlockUserSession(UserSessionBlockReason block_reason); | 134 void BlockUserSession(UserSessionBlockReason block_reason); |
135 void UnblockUserSession(); | 135 void UnblockUserSession(); |
136 | 136 |
137 private: | 137 private: |
138 bool setup_called_; | 138 bool setup_called_; |
139 bool teardown_called_; | 139 bool teardown_called_; |
140 // |SetUp()| doesn't activate session if this is set to false. | 140 // |SetUp()| doesn't activate session if this is set to false. |
141 bool start_session_; | 141 bool start_session_; |
142 content::TestBrowserThreadBundle thread_bundle_; | 142 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
143 scoped_ptr<AshTestHelper> ash_test_helper_; | 143 scoped_ptr<AshTestHelper> ash_test_helper_; |
144 scoped_ptr<aura::test::EventGenerator> event_generator_; | 144 scoped_ptr<aura::test::EventGenerator> event_generator_; |
145 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
146 // Note that the order is important here as ipc_thread_ should be destroyed | 146 // Note that the order is important here as ipc_thread_ should be destroyed |
147 // after metro_viewer_host_->channel_. | 147 // after metro_viewer_host_->channel_. |
148 scoped_ptr<base::Thread> ipc_thread_; | 148 scoped_ptr<base::Thread> ipc_thread_; |
149 scoped_ptr<TestMetroViewerProcessHost> metro_viewer_host_; | 149 scoped_ptr<TestMetroViewerProcessHost> metro_viewer_host_; |
150 ui::ScopedOleInitializer ole_initializer_; | 150 ui::ScopedOleInitializer ole_initializer_; |
151 #endif | 151 #endif |
152 | 152 |
153 DISALLOW_COPY_AND_ASSIGN(AshTestBase); | 153 DISALLOW_COPY_AND_ASSIGN(AshTestBase); |
154 }; | 154 }; |
155 | 155 |
156 class NoSessionAshTestBase : public AshTestBase { | 156 class NoSessionAshTestBase : public AshTestBase { |
157 public: | 157 public: |
158 NoSessionAshTestBase() { | 158 NoSessionAshTestBase() { |
159 set_start_session(false); | 159 set_start_session(false); |
160 } | 160 } |
161 virtual ~NoSessionAshTestBase() {} | 161 virtual ~NoSessionAshTestBase() {} |
162 | 162 |
163 private: | 163 private: |
164 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 164 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace test | 167 } // namespace test |
168 } // namespace ash | 168 } // namespace ash |
169 | 169 |
170 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 170 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |