Chromium Code Reviews| 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..cdd0d26f79f2268c09cc138cc1515cbf65351e7a |
| --- /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 { |
|
mfomitchev
2016/11/18 17:36:24
No reason to create a new class if you are not ove
thanhph
2016/11/18 19:15:44
Cool, thanks..I updated the code to this!
|
| + 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,400x400"); |
| + 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 |