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

Unified Diff: ash/mus/window_manager_ash_unittest.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/test/wm_test_base.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_ash_unittest.cc
diff --git a/ash/mus/window_manager_ash_unittest.cc b/ash/mus/window_manager_ash_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bfc842995a6716d20a6dba0ef50ce0a8e8a61d12
--- /dev/null
+++ b/ash/mus/window_manager_ash_unittest.cc
@@ -0,0 +1,56 @@
+
+#include "ash/mus/test/wm_test_base.h"
+#include "base/macros.h"
+#include "base/bind.h"
+#include "services/ui/public/cpp/window.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ash/mus/root_window_controller.h"
+
+namespace ash {
+class WindowManagerAshTest : public mus::WmTestBase {
+ public:
+ WindowManagerAshTest() {}
+
+ void SetUp() override { mus::WmTestBase::SetUp(); }
+
+ ~WindowManagerAshTest() override {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowManagerAshTest);
+};
+
+TEST_F(WindowManagerAshTest, isWidgetShownInCorrectDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
+ UpdateDisplay("400x400,500x500");
+
+ EXPECT_NE(GetPrimaryRootWindowController(),
+ GetSecondaryRootWindowController());
+ LOG(ERROR) << "\n\n GetPrimaryRootWindowController()->display().id() "
+ << GetPrimaryRootWindowController()->display().id();
+ LOG(ERROR) << "\n\n GetSecondaryRootWindowController()->display().id() "
+ << GetSecondaryRootWindowController()->display().id();
+
+ // ui::Window* ui_primary_window = CreateTestWindow(gfx::Rect(5, 5, 5, 5),
+ // ui::wm::TOP_LEVEL, GetPrimaryRootWindowController());
+ // ui::Window* ui_secondary_window = CreateTestWindow(gfx::Rect(10, 10, 20,
+ // 20), ui::wm::WINDOW_TYPE_NORMAL, GetSecondaryRootWindowController());
+
+ ui::Window* ui_primary_window =
+ CreateFullscreenTestWindow(GetPrimaryRootWindowController());
+ ui::Window* ui_secondary_window =
+ CreateFullscreenTestWindow(GetSecondaryRootWindowController());
+
+ EXPECT_NE(GetPrimaryRootWindowController(),
+ GetSecondaryRootWindowController());
+
+ DCHECK(ui_primary_window);
+ DCHECK(ui_secondary_window);
+
+ EXPECT_NE(ui_primary_window->display_id(), ui_secondary_window->display_id());
+ // LOG(ERROR) << "\n\n GetPrimaryRootWindow() " << GetPrimaryRootWindow();
+ // LOG(ERROR) << "\n\n GetPrimaryRootWindow() " << GetSecondaryRootWindow();
+}
+
+} // namespace ash
« no previous file with comments | « ash/mus/test/wm_test_base.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698