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

Unified Diff: ash/mus/test/ash_test_impl_mus.cc

Issue 2391153002: Converts most of WorkspaceLayoutManager tests to use common code (Closed)
Patch Set: cleanup 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 side-by-side diff with in-line comments
Download patch
Index: ash/mus/test/ash_test_impl_mus.cc
diff --git a/ash/mus/test/ash_test_impl_mus.cc b/ash/mus/test/ash_test_impl_mus.cc
index e530ebe245a1a932ea53ca172b7f4422e86b6a3b..6736ab3fa7059a2dfa4d97a30cb5951b3acaf2fc 100644
--- a/ash/mus/test/ash_test_impl_mus.cc
+++ b/ash/mus/test/ash_test_impl_mus.cc
@@ -65,6 +65,15 @@ std::unique_ptr<WindowOwner> AshTestImplMus::CreateTestWindow(
return base::MakeUnique<WindowOwner>(window);
}
+std::unique_ptr<WindowOwner> AshTestImplMus::CreateToplevelTestWindow(
+ const gfx::Rect& bounds_in_screen,
+ int shell_window_id) {
+ // For mus CreateTestWindow() creates top level windows (assuming
+ // WINDOW_TYPE_NORMAL).
+ return CreateTestWindow(bounds_in_screen, ui::wm::WINDOW_TYPE_NORMAL,
+ shell_window_id);
+}
+
display::Display AshTestImplMus::GetSecondaryDisplay() {
return wm_test_base_->GetSecondaryDisplay();
}
@@ -76,6 +85,20 @@ bool AshTestImplMus::SetSecondaryDisplayPlacement(
return false;
}
+void AshTestImplMus::ConfigureWidgetInitParamsForDisplay(
+ WmWindow* window,
+ views::Widget::InitParams* init_params) {
+ init_params
+ ->mus_properties[ui::mojom::WindowManager::kInitialDisplayId_Property] =
+ mojo::ConvertTo<std::vector<uint8_t>>(
+ WmWindowMus::GetMusWindow(window)->display_id());
+}
+
+void AshTestImplMus::AddTransientChild(WmWindow* parent, WmWindow* window) {
+ WmWindowMus::GetMusWindow(parent)->AddTransientWindow(
+ WmWindowMus::GetMusWindow(window));
+}
+
} // namespace mus
// static
@@ -83,4 +106,9 @@ std::unique_ptr<AshTestImpl> AshTestImpl::Create() {
return base::MakeUnique<mus::AshTestImplMus>();
}
+// static
+bool AshTest::IsMash() {
+ return true;
+}
+
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698