Chromium Code Reviews| Index: ash/common/test/ash_test.h |
| diff --git a/ash/common/test/ash_test.h b/ash/common/test/ash_test.h |
| index 161732a552dce5320cf291be8a6c168df4a8d5cf..841b144076ace4f03e4e541adf6eee6e42909399 100644 |
| --- a/ash/common/test/ash_test.h |
| +++ b/ash/common/test/ash_test.h |
| @@ -13,6 +13,7 @@ |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "ui/display/manager/display_layout.h" |
| #include "ui/gfx/geometry/rect.h" |
| +#include "ui/views/widget/widget.h" |
| #include "ui/wm/public/window_types.h" |
| namespace display { |
| @@ -22,6 +23,7 @@ class Display; |
| namespace ash { |
| class AshTestImpl; |
| +class WmShelf; |
| class WmWindow; |
| // Wraps a WmWindow calling WmWindow::Destroy() from the destructor. WmWindow is |
| @@ -54,6 +56,9 @@ class AshTest : public testing::Test { |
| AshTest(); |
| ~AshTest() override; |
| + // Returns true if running in mash. |
| + static bool IsMash(); |
|
James Cook
2016/10/04 23:16:04
We have WmShell::Get()->IsRunningInMash() now. How
sky
2016/10/06 17:57:06
I forgot about that one. Done.
|
| + |
| bool SupportsMultipleDisplays() const; |
| // Update the display configuration as given in |display_spec|. |
| @@ -69,6 +74,12 @@ class AshTest : public testing::Test { |
| ui::wm::WindowType type = ui::wm::WINDOW_TYPE_NORMAL, |
| int shell_window_id = kShellWindowId_Invalid); |
| + // Creates a visible top-level window. For aura a top-level window is a Window |
|
James Cook
2016/10/04 23:16:04
From the description it's a little hard to tell ho
sky
2016/10/06 17:57:06
I added a reference to aura::Window::GetToplevelWi
|
| + // that has a delegate. |
| + std::unique_ptr<WindowOwner> CreateToplevelTestWindow( |
| + const gfx::Rect& bounds_in_screen = gfx::Rect(), |
| + int shell_window_id = kShellWindowId_Invalid); |
| + |
| // Creates a visible window parented to |parent| with the specified bounds and |
| // id. |
| std::unique_ptr<WindowOwner> CreateChildWindow( |
| @@ -87,6 +98,25 @@ class AshTest : public testing::Test { |
| display::DisplayPlacement::Position position, |
| int offset); |
| + // Configures |init_params| so that the widget will be created on the same |
| + // display as |window|. |
| + void ConfigureWidgetInitParamsForDisplay( |
| + WmWindow* window, |
| + views::Widget::InitParams* init_params); |
| + |
| + // Returns the WmShelf for the primary display. |
| + WmShelf* GetPrimaryShelf(); |
|
James Cook
2016/10/04 23:16:04
static and (optionally) move up
I think there are
sky
2016/10/06 17:57:06
Done.
|
| + |
| + // Adds |window| to the appropriate container in the primary root window. |
| + void ParentWindowInPrimaryRootWindow(WmWindow* window); |
| + |
| + // Adds |window| as as a transient child of |parent|. |
| + void AddTransientChild(WmWindow* parent, WmWindow* window); |
| + |
| + void SetCanLockScreen(bool can_lock_screen); |
|
James Cook
2016/10/04 23:16:04
Function comment? "Lock" means signout-related-loc
sky
2016/10/06 17:57:06
Done.
|
| + |
| + void RunAllPendingInMessageLoop(); |
| + |
| protected: |
| // testing::Test: |
| void SetUp() override; |