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

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

Issue 2840393002: chromeos: converts TopLevelWindowFactoryTest to AshTestBase (Closed)
Patch Set: remove duplicate function Created 3 years, 8 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
« no previous file with comments | « ash/display/window_tree_host_manager_unittest.cc ('k') | ash/mus/test/wm_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 display::Display GetSecondaryDisplay(); 55 display::Display GetSecondaryDisplay();
56 56
57 // Creates a top level window visible window in the appropriate container. 57 // Creates a top level window visible window in the appropriate container.
58 // NOTE: you can explicitly destroy the returned value if necessary, but it 58 // NOTE: you can explicitly destroy the returned value if necessary, but it
59 // will also be automatically destroyed when the WindowTreeClient is 59 // will also be automatically destroyed when the WindowTreeClient is
60 // destroyed. 60 // destroyed.
61 aura::Window* CreateTestWindow(const gfx::Rect& bounds); 61 aura::Window* CreateTestWindow(const gfx::Rect& bounds);
62 aura::Window* CreateTestWindow(const gfx::Rect& bounds, 62 aura::Window* CreateTestWindow(const gfx::Rect& bounds,
63 ui::wm::WindowType window_type); 63 ui::wm::WindowType window_type);
64 64
65 // Creates a visibile fullscreen top level window on the display corresponding
66 // to the display_id provided.
67 aura::Window* CreateFullscreenTestWindow(
68 int64_t display_id = display::kInvalidDisplayId);
69
70 // Creates a window parented to |parent|. The returned window is visible. 65 // Creates a window parented to |parent|. The returned window is visible.
71 aura::Window* CreateChildTestWindow(aura::Window* parent, 66 aura::Window* CreateChildTestWindow(aura::Window* parent,
72 const gfx::Rect& bounds); 67 const gfx::Rect& bounds);
73 68
74 protected: 69 protected:
75 // testing::Test: 70 // testing::Test:
76 void SetUp() override; 71 void SetUp() override;
77 void TearDown() override; 72 void TearDown() override;
78 73
79 private: 74 private:
80 friend class AshTestImplMus; 75 friend class AshTestImplMus;
81 76
82 // Simulates the first user logging in and the session becoming active. 77 // Simulates the first user logging in and the session becoming active.
83 // Classic ash handles this via AshTestHelper and TestSessionStateDelegate. 78 // Classic ash handles this via AshTestHelper and TestSessionStateDelegate.
84 void SimulateUserLogin(); 79 void SimulateUserLogin();
85 80
86 bool setup_called_ = false; 81 bool setup_called_ = false;
87 bool teardown_called_ = false; 82 bool teardown_called_ = false;
88 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 83 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
89 std::unique_ptr<WmWindowTestApi::GlobalMinimumSizeLock> minimum_size_lock_; 84 std::unique_ptr<WmWindowTestApi::GlobalMinimumSizeLock> minimum_size_lock_;
90 std::unique_ptr<WmTestHelper> test_helper_; 85 std::unique_ptr<WmTestHelper> test_helper_;
91 86
92 DISALLOW_COPY_AND_ASSIGN(WmTestBase); 87 DISALLOW_COPY_AND_ASSIGN(WmTestBase);
93 }; 88 };
94 89
95 } // namespace mus 90 } // namespace mus
96 } // namespace ash 91 } // namespace ash
97 92
98 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_ 93 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager_unittest.cc ('k') | ash/mus/test/wm_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698