| Index: ash/display/display_manager_unittest.cc
|
| diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
|
| index 0706b0ee1313594739bcad47fb1d2b1a329b00f4..76475cb01f268672da245558076ddb05a26d9372 100644
|
| --- a/ash/display/display_manager_unittest.cc
|
| +++ b/ash/display/display_manager_unittest.cc
|
| @@ -9,6 +9,7 @@
|
| #include "ash/shell.h"
|
| #include "ash/test/ash_test_base.h"
|
| #include "ash/test/display_manager_test_api.h"
|
| +#include "ash/test/mirror_window_test_api.h"
|
| #include "base/format_macros.h"
|
| #include "base/stringprintf.h"
|
| #include "ui/aura/env.h"
|
| @@ -712,7 +713,11 @@ TEST_F(DisplayManagerTest, Rotate) {
|
| GetDisplayInfoAt(1).bounds_in_pixel().ToString());
|
| EXPECT_EQ("400x300",
|
| GetDisplayInfoAt(1).size_in_pixel().ToString());
|
| + reset();
|
| UpdateDisplay("100x200/b,300x400");
|
| + EXPECT_EQ("2 0 0", GetCountSummary());
|
| + reset();
|
| +
|
| EXPECT_EQ("1,1 100x200",
|
| GetDisplayInfoAt(0).bounds_in_pixel().ToString());
|
| EXPECT_EQ("100x200",
|
| @@ -722,6 +727,13 @@ TEST_F(DisplayManagerTest, Rotate) {
|
| GetDisplayInfoAt(1).bounds_in_pixel().ToString());
|
| EXPECT_EQ("300x400",
|
| GetDisplayInfoAt(1).size_in_pixel().ToString());
|
| +
|
| + UpdateDisplay("200x200");
|
| + EXPECT_EQ("1 0 1", GetCountSummary());
|
| + reset();
|
| +
|
| + UpdateDisplay("200x200/l");
|
| + EXPECT_EQ("1 0 0", GetCountSummary());
|
| }
|
|
|
| TEST_F(DisplayManagerTest, UIScale) {
|
| @@ -839,5 +851,33 @@ TEST_F(DisplayManagerTest, MAYBE_UpdateMouseCursorAfterRotateZoom) {
|
| EXPECT_EQ("750,75", env->last_mouse_location().ToString());
|
| }
|
|
|
| +#if defined(OS_WIN)
|
| +// This does not work on metro.
|
| +#define MAYBE_SoftwareMirroring DISABLED_SoftwareMirroring
|
| +#else
|
| +#define MAYBE_SoftwareMirroring SoftwareMirroring
|
| +#endif
|
| +
|
| +TEST_F(DisplayManagerTest, MAYBE_SoftwareMirroring) {
|
| + UpdateDisplay("300x400,400x500");
|
| +
|
| + test::MirrorWindowTestApi test_api;
|
| + EXPECT_EQ(NULL, test_api.GetRootWindow());
|
| +
|
| + DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| + display_manager->SetSoftwareMirroring(true);
|
| + display_manager->UpdateDisplays();
|
| + EXPECT_EQ(1U, display_manager->GetNumDisplays());
|
| + EXPECT_EQ("0,0 300x400",
|
| + Shell::GetScreen()->GetPrimaryDisplay().bounds().ToString());
|
| + EXPECT_EQ("400x500", test_api.GetRootWindow()->GetHostSize().ToString());
|
| + EXPECT_TRUE(display_manager->IsMirrored());
|
| +
|
| + display_manager->SetMirrorMode(false);
|
| + EXPECT_EQ(NULL, test_api.GetRootWindow());
|
| + EXPECT_EQ(2U, display_manager->GetNumDisplays());
|
| + EXPECT_FALSE(display_manager->IsMirrored());
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace ash
|
|
|