OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_TEST_ASH_TEST_H_ | 5 #ifndef ASH_TEST_ASH_TEST_H_ |
6 #define ASH_COMMON_TEST_ASH_TEST_H_ | 6 #define ASH_TEST_ASH_TEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "ash/public/cpp/shell_window_ids.h" | 11 #include "ash/public/cpp/shell_window_ids.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "ui/display/display_layout.h" | 14 #include "ui/display/display_layout.h" |
15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 WmWindow* window() { return window_; } | 48 WmWindow* window() { return window_; } |
49 | 49 |
50 private: | 50 private: |
51 WmWindow* window_; | 51 WmWindow* window_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(WindowOwner); | 53 DISALLOW_COPY_AND_ASSIGN(WindowOwner); |
54 }; | 54 }; |
55 | 55 |
56 // Base class for ash tests. This class calls through to AshTestImpl for the | 56 // Base class for ash tests. This class calls through to AshTestImpl for the |
57 // real implementation. This class exists so that tests can be written to | 57 // real implementation. This class exists so that tests can be written to |
58 // ash/common and run in both mus and aura. | 58 // run in both mus ash and classic ash. |
59 // | 59 // |
60 // The implementation of AshTestImpl that is used depends upon gn targets. To | 60 // The implementation of AshTestImpl that is used depends upon gn targets. To |
61 // use the aura backend depend on "//ash/test:ash_with_aura_test_support." The | 61 // use the aura backend depend on "//ash/test:ash_with_aura_test_support." The |
62 // mus backend is not provided as a separate link target. | 62 // mus backend is not provided as a separate link target. |
63 class AshTest : public testing::Test { | 63 class AshTest : public testing::Test { |
64 public: | 64 public: |
65 AshTest(); | 65 AshTest(); |
66 ~AshTest() override; | 66 ~AshTest() override; |
67 | 67 |
68 // Returns the WmShelf for the primary display. | 68 // Returns the WmShelf for the primary display. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void TearDown() override; | 139 void TearDown() override; |
140 | 140 |
141 private: | 141 private: |
142 std::unique_ptr<AshTestImpl> test_impl_; | 142 std::unique_ptr<AshTestImpl> test_impl_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(AshTest); | 144 DISALLOW_COPY_AND_ASSIGN(AshTest); |
145 }; | 145 }; |
146 | 146 |
147 } // namespace ash | 147 } // namespace ash |
148 | 148 |
149 #endif // ASH_COMMON_TEST_ASH_TEST_H_ | 149 #endif // ASH_TEST_ASH_TEST_H_ |
OLD | NEW |