| 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 <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "ash/common/material_design/material_design_controller.h" | 13 #include "ash/common/material_design/material_design_controller.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 18 #include "content/public/test/test_browser_thread_bundle.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "third_party/skia/include/core/SkColor.h" | 20 #include "third_party/skia/include/core/SkColor.h" |
| 20 #include "ui/display/display.h" | 21 #include "ui/display/display.h" |
| 21 #include "ui/wm/public/window_types.h" | 22 #include "ui/wm/public/window_types.h" |
| 22 | 23 |
| 23 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 24 #include "ui/base/win/scoped_ole_initializer.h" | 25 #include "ui/base/win/scoped_ole_initializer.h" |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 27 namespace aura { | 28 namespace aura { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 class WidgetDelegate; | 46 class WidgetDelegate; |
| 46 } | 47 } |
| 47 | 48 |
| 48 namespace ash { | 49 namespace ash { |
| 49 class DisplayManager; | 50 class DisplayManager; |
| 50 class SystemTray; | 51 class SystemTray; |
| 51 class WmShelf; | 52 class WmShelf; |
| 52 | 53 |
| 53 namespace test { | 54 namespace test { |
| 54 | 55 |
| 55 class AshTestEnvironment; | |
| 56 class AshTestHelper; | 56 class AshTestHelper; |
| 57 class TestScreenshotDelegate; | 57 class TestScreenshotDelegate; |
| 58 class TestSystemTrayDelegate; | 58 class TestSystemTrayDelegate; |
| 59 #if defined(OS_WIN) |
| 60 class TestMetroViewerProcessHost; |
| 61 #endif |
| 59 | 62 |
| 60 class AshTestBase : public testing::Test { | 63 class AshTestBase : public testing::Test { |
| 61 public: | 64 public: |
| 62 AshTestBase(); | 65 AshTestBase(); |
| 63 ~AshTestBase() override; | 66 ~AshTestBase() override; |
| 64 | 67 |
| 65 // testing::Test: | 68 // testing::Test: |
| 66 void SetUp() override; | 69 void SetUp() override; |
| 67 void TearDown() override; | 70 void TearDown() override; |
| 68 | 71 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void UnblockUserSession(); | 172 void UnblockUserSession(); |
| 170 | 173 |
| 171 void DisableIME(); | 174 void DisableIME(); |
| 172 | 175 |
| 173 private: | 176 private: |
| 174 bool setup_called_; | 177 bool setup_called_; |
| 175 bool teardown_called_; | 178 bool teardown_called_; |
| 176 // |SetUp()| doesn't activate session if this is set to false. | 179 // |SetUp()| doesn't activate session if this is set to false. |
| 177 bool start_session_; | 180 bool start_session_; |
| 178 MaterialDesignController::Mode material_mode_; | 181 MaterialDesignController::Mode material_mode_; |
| 179 std::unique_ptr<AshTestEnvironment> ash_test_environment_; | 182 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
| 180 std::unique_ptr<AshTestHelper> ash_test_helper_; | 183 std::unique_ptr<AshTestHelper> ash_test_helper_; |
| 181 std::unique_ptr<ui::test::EventGenerator> event_generator_; | 184 std::unique_ptr<ui::test::EventGenerator> event_generator_; |
| 182 #if defined(OS_WIN) | 185 #if defined(OS_WIN) |
| 183 ui::ScopedOleInitializer ole_initializer_; | 186 ui::ScopedOleInitializer ole_initializer_; |
| 184 #endif | 187 #endif |
| 185 | 188 |
| 186 DISALLOW_COPY_AND_ASSIGN(AshTestBase); | 189 DISALLOW_COPY_AND_ASSIGN(AshTestBase); |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 class NoSessionAshTestBase : public AshTestBase { | 192 class NoSessionAshTestBase : public AshTestBase { |
| 190 public: | 193 public: |
| 191 NoSessionAshTestBase() { set_start_session(false); } | 194 NoSessionAshTestBase() { set_start_session(false); } |
| 192 ~NoSessionAshTestBase() override {} | 195 ~NoSessionAshTestBase() override {} |
| 193 | 196 |
| 194 private: | 197 private: |
| 195 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 198 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
| 196 }; | 199 }; |
| 197 | 200 |
| 198 } // namespace test | 201 } // namespace test |
| 199 } // namespace ash | 202 } // namespace ash |
| 200 | 203 |
| 201 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 204 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
| OLD | NEW |