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