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

Unified Diff: ash/mus/window_manager_ash_unittest.cc

Issue 2503623002: Support creation of toplevel mus::Windows on separate displays (Closed)
Patch Set: Fix container root lookup. Don't need to initialize container id for unit test. 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
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..48a4d1dcc31fd599b1b4d20b179a1d99bdf463eb
--- /dev/null
+++ b/ash/mus/window_manager_ash_unittest.cc
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/mus/test/wm_test_base.h"
+#include "base/bind.h"
+#include "base/macros.h"
+#include "services/ui/public/cpp/window.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());
+
+ ui::Window* ui_primary_window =
+ CreateFullscreenTestWindow(GetPrimaryRootWindowController());
+ ui::Window* ui_secondary_window =
+ CreateFullscreenTestWindow(GetSecondaryRootWindowController());
+
+ DCHECK(ui_primary_window);
+ DCHECK(ui_secondary_window);
+
+ EXPECT_NE(ui_primary_window->display_id(), ui_secondary_window->display_id());
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698