| OLD | NEW |
| (Empty) | |
| 1 |
| 2 #include "ash/mus/test/wm_test_base.h" |
| 3 #include "base/macros.h" |
| 4 #include "base/bind.h" |
| 5 #include "services/ui/public/cpp/window.h" |
| 6 #include "ui/gfx/geometry/rect.h" |
| 7 #include "ash/mus/root_window_controller.h" |
| 8 |
| 9 namespace ash { |
| 10 class WindowManagerAshTest : public mus::WmTestBase { |
| 11 public: |
| 12 WindowManagerAshTest() {} |
| 13 |
| 14 void SetUp() override { mus::WmTestBase::SetUp(); } |
| 15 |
| 16 ~WindowManagerAshTest() override {} |
| 17 |
| 18 private: |
| 19 DISALLOW_COPY_AND_ASSIGN(WindowManagerAshTest); |
| 20 }; |
| 21 |
| 22 TEST_F(WindowManagerAshTest, isWidgetShownInCorrectDisplay) { |
| 23 if (!SupportsMultipleDisplays()) |
| 24 return; |
| 25 |
| 26 UpdateDisplay("400x400,500x500"); |
| 27 |
| 28 EXPECT_NE(GetPrimaryRootWindowController(), |
| 29 GetSecondaryRootWindowController()); |
| 30 LOG(ERROR) << "\n\n GetPrimaryRootWindowController()->display().id() " |
| 31 << GetPrimaryRootWindowController()->display().id(); |
| 32 LOG(ERROR) << "\n\n GetSecondaryRootWindowController()->display().id() " |
| 33 << GetSecondaryRootWindowController()->display().id(); |
| 34 |
| 35 // ui::Window* ui_primary_window = CreateTestWindow(gfx::Rect(5, 5, 5, 5), |
| 36 // ui::wm::TOP_LEVEL, GetPrimaryRootWindowController()); |
| 37 // ui::Window* ui_secondary_window = CreateTestWindow(gfx::Rect(10, 10, 20, |
| 38 // 20), ui::wm::WINDOW_TYPE_NORMAL, GetSecondaryRootWindowController()); |
| 39 |
| 40 ui::Window* ui_primary_window = |
| 41 CreateFullscreenTestWindow(GetPrimaryRootWindowController()); |
| 42 ui::Window* ui_secondary_window = |
| 43 CreateFullscreenTestWindow(GetSecondaryRootWindowController()); |
| 44 |
| 45 EXPECT_NE(GetPrimaryRootWindowController(), |
| 46 GetSecondaryRootWindowController()); |
| 47 |
| 48 DCHECK(ui_primary_window); |
| 49 DCHECK(ui_secondary_window); |
| 50 |
| 51 EXPECT_NE(ui_primary_window->display_id(), ui_secondary_window->display_id()); |
| 52 // LOG(ERROR) << "\n\n GetPrimaryRootWindow() " << GetPrimaryRootWindow(); |
| 53 // LOG(ERROR) << "\n\n GetPrimaryRootWindow() " << GetSecondaryRootWindow(); |
| 54 } |
| 55 |
| 56 } // namespace ash |
| OLD | NEW |