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

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

Issue 2391153002: Converts most of WorkspaceLayoutManager tests to use common code (Closed)
Patch Set: merge 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
« no previous file with comments | « ash/mus/test/ash_test_impl_mus.h ('k') | ash/mus/test/wm_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3659cb24eea1bbf2371f3b185e32c1578b3e106b 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
« no previous file with comments | « ash/mus/test/ash_test_impl_mus.h ('k') | ash/mus/test/wm_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698