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

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

Issue 2484813002: Add child for parent_mus when params.parent_mus is not initialized. (Closed)
Patch Set: Discard this patchset. Wrong branch committed. Created 4 years, 1 month 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/mus/BUILD.gn ('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 30 matching lines...) Expand all
41 // TODO(sky): temporary until http://crbug.com/611563 is fixed. 41 // TODO(sky): temporary until http://crbug.com/611563 is fixed.
42 bool SupportsMultipleDisplays() const; 42 bool SupportsMultipleDisplays() const;
43 43
44 // Update the display configuration as given in |display_spec|. 44 // Update the display configuration as given in |display_spec|.
45 // See test::DisplayManagerTestApi::UpdateDisplay for more details. 45 // See test::DisplayManagerTestApi::UpdateDisplay for more details.
46 void UpdateDisplay(const std::string& display_spec); 46 void UpdateDisplay(const std::string& display_spec);
47 47
48 ui::Window* GetPrimaryRootWindow(); 48 ui::Window* GetPrimaryRootWindow();
49 ui::Window* GetSecondaryRootWindow(); 49 ui::Window* GetSecondaryRootWindow();
50 50
51 RootWindowController* GetPrimaryRootWindowController();
52 RootWindowController* GetSecondaryRootWindowController();
53
51 display::Display GetPrimaryDisplay(); 54 display::Display GetPrimaryDisplay();
52 display::Display GetSecondaryDisplay(); 55 display::Display GetSecondaryDisplay();
53 56
54 // Creates a top level window visible window in the appropriate container. 57 // Creates a top level window visible window in the appropriate container.
55 // 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
56 // will also be automatically destroyed when the WindowTreeClient is 59 // will also be automatically destroyed when the WindowTreeClient is
57 // destroyed. 60 // destroyed.
58 ui::Window* CreateTestWindow(const gfx::Rect& bounds); 61 ui::Window* CreateTestWindow(const gfx::Rect& bounds);
59 ui::Window* CreateTestWindow(const gfx::Rect& bounds, 62 ui::Window* CreateTestWindow(const gfx::Rect& bounds,
60 ui::wm::WindowType window_type); 63 ui::wm::WindowType window_type);
64
65 // for multiple displays
66 ui::Window* CreateTestWindow(const gfx::Rect& bounds,
67 ui::wm::WindowType window_type,
68 RootWindowController* root);
69
61 ui::Window* CreateFullscreenTestWindow(); 70 ui::Window* CreateFullscreenTestWindow();
71 ui::Window* CreateFullscreenTestWindow(RootWindowController* root);
62 72
63 // Creates a window parented to |parent|. The returned window is visible. 73 // Creates a window parented to |parent|. The returned window is visible.
64 ui::Window* CreateChildTestWindow(ui::Window* parent, 74 ui::Window* CreateChildTestWindow(ui::Window* parent,
65 const gfx::Rect& bounds); 75 const gfx::Rect& bounds);
66 76
67 protected: 77 protected:
68 // testing::Test: 78 // testing::Test:
69 void SetUp() override; 79 void SetUp() override;
70 void TearDown() override; 80 void TearDown() override;
71 81
72 private: 82 private:
73 friend class AshTestImplMus; 83 friend class AshTestImplMus;
74 84
75 bool setup_called_ = false; 85 bool setup_called_ = false;
76 bool teardown_called_ = false; 86 bool teardown_called_ = false;
77 std::unique_ptr<WmTestHelper> test_helper_; 87 std::unique_ptr<WmTestHelper> test_helper_;
78 88
79 DISALLOW_COPY_AND_ASSIGN(WmTestBase); 89 DISALLOW_COPY_AND_ASSIGN(WmTestBase);
80 }; 90 };
81 91
82 } // namespace mus 92 } // namespace mus
83 } // namespace ash 93 } // namespace ash
84 94
85 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_ 95 #endif // ASH_MUS_TEST_WM_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/mus/BUILD.gn ('k') | ash/mus/test/wm_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698