Index: ash/common/test/ash_test.cc |
diff --git a/ash/common/test/ash_test.cc b/ash/common/test/ash_test.cc |
index 88030968a8bf716a2ebddbacd6d7c10ef3306ee9..0f71f2c5a763d78f80754e46634aabd15aac5fe2 100644 |
--- a/ash/common/test/ash_test.cc |
+++ b/ash/common/test/ash_test.cc |
@@ -5,8 +5,11 @@ |
#include "ash/common/test/ash_test.h" |
#include "ash/common/test/ash_test_impl.h" |
+#include "ash/common/wm_root_window_controller.h" |
#include "ash/common/wm_shell.h" |
#include "ash/common/wm_window.h" |
+#include "ash/test/test_session_state_delegate.h" |
+#include "base/run_loop.h" |
#include "ui/compositor/layer_type.h" |
#include "ui/display/display.h" |
@@ -22,6 +25,14 @@ AshTest::AshTest() : test_impl_(AshTestImpl::Create()) {} |
AshTest::~AshTest() {} |
+// static |
+WmShelf* AshTest::GetPrimaryShelf() { |
+ return WmShell::Get() |
+ ->GetPrimaryRootWindow() |
+ ->GetRootWindowController() |
+ ->GetShelf(); |
+} |
+ |
bool AshTest::SupportsMultipleDisplays() const { |
return test_impl_->SupportsMultipleDisplays(); |
} |
@@ -36,6 +47,13 @@ std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds, |
return test_impl_->CreateTestWindow(bounds, type, shell_window_id); |
} |
+std::unique_ptr<WindowOwner> AshTest::CreateToplevelTestWindow( |
+ const gfx::Rect& bounds_in_screen, |
+ int shell_window_id) { |
+ return test_impl_->CreateToplevelTestWindow(bounds_in_screen, |
+ shell_window_id); |
+} |
+ |
std::unique_ptr<WindowOwner> AshTest::CreateChildWindow(WmWindow* parent, |
const gfx::Rect& bounds, |
int shell_window_id) { |
@@ -59,6 +77,26 @@ bool AshTest::SetSecondaryDisplayPlacement( |
return test_impl_->SetSecondaryDisplayPlacement(position, offset); |
} |
+void AshTest::ConfigureWidgetInitParamsForDisplay( |
+ WmWindow* window, |
+ views::Widget::InitParams* init_params) { |
+ test_impl_->ConfigureWidgetInitParamsForDisplay(window, init_params); |
+} |
+ |
+void AshTest::ParentWindowInPrimaryRootWindow(WmWindow* window) { |
+ window->SetParentUsingContext(WmShell::Get()->GetPrimaryRootWindow(), |
+ gfx::Rect()); |
+} |
+ |
+void AshTest::AddTransientChild(WmWindow* parent, WmWindow* window) { |
+ test_impl_->AddTransientChild(parent, window); |
+} |
+ |
+void AshTest::RunAllPendingInMessageLoop() { |
+ base::RunLoop run_loop; |
+ run_loop.RunUntilIdle(); |
+} |
+ |
void AshTest::SetUp() { |
test_impl_->SetUp(); |
} |