Chromium Code Reviews| 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..4c4e68948a20d414f4cfb09c967d6e4963448119 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 DisplayWindowInSpecifiedDisplayTest = mus::WmTestBase; |
|
mfomitchev
2016/11/23 17:58:00
I think this is still too specific. This name corr
thanhph
2016/11/23 18:42:19
I misinterpreted your last comment. Done, thanks!
|
| + |
| +TEST_F(DisplayWindowInSpecifiedDisplayTest, IsWindowShownInCorrectDisplay) { |
| + 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 |