Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: ash/mus/test/wm_test_base.h

Issue 2374893002: Adds AshTest (Closed)
Patch Set: real feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MUS_TEST_WM_TEST_BASE_H_ 5 #ifndef ASH_MUS_TEST_WM_TEST_BASE_H_
6 #define ASH_MUS_TEST_WM_TEST_BASE_H_ 6 #define ASH_MUS_TEST_WM_TEST_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/wm/public/window_types.h" 13 #include "ui/wm/public/window_types.h"
14 14
15 namespace display { 15 namespace display {
16 class Display; 16 class Display;
17 } 17 }
18 18
19 namespace gfx { 19 namespace gfx {
20 class Rect; 20 class Rect;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 class Window; 24 class Window;
25 } 25 }
26 26
27 namespace ash { 27 namespace ash {
28 namespace mus { 28 namespace mus {
29 29
30 class AshTestImplMus;
30 class RootWindowController; 31 class RootWindowController;
31 class WmTestHelper; 32 class WmTestHelper;
32 33
33 // Base class for window manager tests that want to configure 34 // Base class for window manager tests that want to configure
34 // WindowTreeClient without a client to mus. 35 // WindowTreeClient without a client to mus.
35 class WmTestBase : public testing::Test { 36 class WmTestBase : public testing::Test {
36 public: 37 public:
37 WmTestBase(); 38 WmTestBase();
38 ~WmTestBase() override; 39 ~WmTestBase() override;
39 40
(...skipping 22 matching lines...) Expand all
62 // Creates a window parented to |parent|. The returned window is visible. 63 // Creates a window parented to |parent|. The returned window is visible.
63 ui::Window* CreateChildTestWindow(ui::Window* parent, 64 ui::Window* CreateChildTestWindow(ui::Window* parent,
64 const gfx::Rect& bounds); 65 const gfx::Rect& bounds);
65 66
66 protected: 67 protected:
67 // testing::Test: 68 // testing::Test:
68 void SetUp() override; 69 void SetUp() override;
69 void TearDown() override; 70 void TearDown() override;
70 71
71 private: 72 private:
73 friend class AshTestImplMus;
74
72 bool setup_called_ = false; 75 bool setup_called_ = false;
73 bool teardown_called_ = false; 76 bool teardown_called_ = false;
74 std::unique_ptr<WmTestHelper> test_helper_; 77 std::unique_ptr<WmTestHelper> test_helper_;
75 78
76 DISALLOW_COPY_AND_ASSIGN(WmTestBase); 79 DISALLOW_COPY_AND_ASSIGN(WmTestBase);
77 }; 80 };
78 81
79 } // namespace mus 82 } // namespace mus
80 } // namespace ash 83 } // namespace ash
81 84
82 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_ 85 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698