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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
15 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/skia/include/core/SkColor.h" | 19 #include "third_party/skia/include/core/SkColor.h" |
19 #include "ui/gfx/display.h" | 20 #include "ui/gfx/display.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 void BlockUserSession(UserSessionBlockReason block_reason); | 142 void BlockUserSession(UserSessionBlockReason block_reason); |
142 void UnblockUserSession(); | 143 void UnblockUserSession(); |
143 | 144 |
144 void DisableIME(); | 145 void DisableIME(); |
145 | 146 |
146 private: | 147 private: |
147 bool setup_called_; | 148 bool setup_called_; |
148 bool teardown_called_; | 149 bool teardown_called_; |
149 // |SetUp()| doesn't activate session if this is set to false. | 150 // |SetUp()| doesn't activate session if this is set to false. |
150 bool start_session_; | 151 bool start_session_; |
151 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; | 152 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
152 scoped_ptr<AshTestHelper> ash_test_helper_; | 153 std::unique_ptr<AshTestHelper> ash_test_helper_; |
153 scoped_ptr<ui::test::EventGenerator> event_generator_; | 154 std::unique_ptr<ui::test::EventGenerator> event_generator_; |
154 #if defined(OS_WIN) | 155 #if defined(OS_WIN) |
155 ui::ScopedOleInitializer ole_initializer_; | 156 ui::ScopedOleInitializer ole_initializer_; |
156 #endif | 157 #endif |
157 | 158 |
158 DISALLOW_COPY_AND_ASSIGN(AshTestBase); | 159 DISALLOW_COPY_AND_ASSIGN(AshTestBase); |
159 }; | 160 }; |
160 | 161 |
161 class NoSessionAshTestBase : public AshTestBase { | 162 class NoSessionAshTestBase : public AshTestBase { |
162 public: | 163 public: |
163 NoSessionAshTestBase() { | 164 NoSessionAshTestBase() { |
164 set_start_session(false); | 165 set_start_session(false); |
165 } | 166 } |
166 ~NoSessionAshTestBase() override {} | 167 ~NoSessionAshTestBase() override {} |
167 | 168 |
168 private: | 169 private: |
169 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 170 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
170 }; | 171 }; |
171 | 172 |
172 } // namespace test | 173 } // namespace test |
173 } // namespace ash | 174 } // namespace ash |
174 | 175 |
175 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 176 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |