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

Unified Diff: ash/mus/window_manager_unittest.cc

Issue 2503623002: Support creation of toplevel mus::Windows on separate displays (Closed)
Patch Set: remove default display_id value in .cc 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
« ash/mus/root_window_controller.cc ('K') | « ash/mus/test/wm_test_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_unittest.cc
diff --git a/ash/mus/window_manager_unittest.cc b/ash/mus/window_manager_unittest.cc
index 62a86dd139ee9f3db49fb7ca8a04f9547414e7d5..df031fb46c389c6986d1ebc3fcbae46949e36ce4 100644
--- a/ash/mus/window_manager_unittest.cc
+++ b/ash/mus/window_manager_unittest.cc
@@ -4,6 +4,7 @@
#include <memory>
+#include "ash/mus/test/wm_test_base.h"
#include "base/bind.h"
#include "base/macros.h"
#include "services/service_manager/public/cpp/service_test.h"
@@ -80,5 +81,26 @@ TEST_F(WindowManagerTest, MAYBE_OpenWindow) {
ASSERT_TRUE(!child_client->GetRoots().empty());
}
+using WindowManagerDisplayTest = mus::WmTestBase;
+
+TEST_F(WindowManagerDisplayTest, IsWindowShownInCorrectDisplay) {
sky 2016/11/23 20:48:19 This is a test of functionality in RootWindowContr
thanhph 2016/11/23 21:31:42 I used the name RootWindowControllerWmTest since R
+ if (!SupportsMultipleDisplays())
+ return;
+
+ UpdateDisplay("400x400,400x400");
+ EXPECT_NE(GetPrimaryDisplay().id(), GetSecondaryDisplay().id());
+
+ ui::Window* window_primary_display =
+ CreateFullscreenTestWindow(GetPrimaryDisplay().id());
+ ui::Window* window_secondary_display =
+ CreateFullscreenTestWindow(GetSecondaryDisplay().id());
+
+ DCHECK(window_primary_display);
+ DCHECK(window_secondary_display);
+
+ EXPECT_EQ(window_primary_display->display_id(), GetPrimaryDisplay().id());
+ EXPECT_EQ(window_secondary_display->display_id(), GetSecondaryDisplay().id());
+}
+
} // namespace mus
} // namespace ash
« ash/mus/root_window_controller.cc ('K') | « ash/mus/test/wm_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698