| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
| 9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 EXPECT_EQ(third_display.id(), ScreenAsh::GetSecondaryDisplay().id()); | 426 EXPECT_EQ(third_display.id(), ScreenAsh::GetSecondaryDisplay().id()); |
| 427 EXPECT_EQ( | 427 EXPECT_EQ( |
| 428 primary_root, | 428 primary_root, |
| 429 display_controller->GetRootWindowForDisplayId(primary_display.id())); | 429 display_controller->GetRootWindowForDisplayId(primary_display.id())); |
| 430 EXPECT_NE( | 430 EXPECT_NE( |
| 431 primary_root, | 431 primary_root, |
| 432 display_controller->GetRootWindowForDisplayId(third_display.id())); | 432 display_controller->GetRootWindowForDisplayId(third_display.id())); |
| 433 EXPECT_TRUE(primary_root->Contains(launcher_window)); | 433 EXPECT_TRUE(primary_root->Contains(launcher_window)); |
| 434 } | 434 } |
| 435 | 435 |
| 436 TEST_F(DisplayControllerTest, CursorDeviceScaleFactorSwapPrimary) { | 436 #if defined(OS_WIN) |
| 437 // Multiple displays are not supported on Windows Ash. http://crbug.com/165962 |
| 438 #define MAYBE_CursorDeviceScaleFactorSwapPrimary \ |
| 439 DISABLED_CursorDeviceScaleFactorSwapPrimary |
| 440 #else |
| 441 #define MAYBE_CursorDeviceScaleFactorSwapPrimary \ |
| 442 CursorDeviceScaleFactorSwapPrimary |
| 443 #endif |
| 444 |
| 445 TEST_F(DisplayControllerTest, MAYBE_CursorDeviceScaleFactorSwapPrimary) { |
| 437 DisplayController* display_controller = | 446 DisplayController* display_controller = |
| 438 Shell::GetInstance()->display_controller(); | 447 Shell::GetInstance()->display_controller(); |
| 439 | 448 |
| 440 UpdateDisplay("200x200,200x200*2"); | 449 UpdateDisplay("200x200,200x200*2"); |
| 441 gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); | 450 gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); |
| 442 gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay(); | 451 gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay(); |
| 443 | 452 |
| 444 aura::RootWindow* primary_root = | 453 aura::RootWindow* primary_root = |
| 445 display_controller->GetRootWindowForDisplayId(primary_display.id()); | 454 display_controller->GetRootWindowForDisplayId(primary_display.id()); |
| 446 aura::RootWindow* secondary_root = | 455 aura::RootWindow* secondary_root = |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 UpdateDisplay("100+200-100x200,300+500-200x300"); | 530 UpdateDisplay("100+200-100x200,300+500-200x300"); |
| 522 ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); | 531 ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); |
| 523 EXPECT_EQ("100,200", root_windows[0]->GetHostOrigin().ToString()); | 532 EXPECT_EQ("100,200", root_windows[0]->GetHostOrigin().ToString()); |
| 524 EXPECT_EQ("100x200", root_windows[0]->GetHostSize().ToString()); | 533 EXPECT_EQ("100x200", root_windows[0]->GetHostSize().ToString()); |
| 525 EXPECT_EQ("300,500", root_windows[1]->GetHostOrigin().ToString()); | 534 EXPECT_EQ("300,500", root_windows[1]->GetHostOrigin().ToString()); |
| 526 EXPECT_EQ("200x300", root_windows[1]->GetHostSize().ToString()); | 535 EXPECT_EQ("200x300", root_windows[1]->GetHostSize().ToString()); |
| 527 } | 536 } |
| 528 | 537 |
| 529 } // namespace test | 538 } // namespace test |
| 530 } // namespace ash | 539 } // namespace ash |
| OLD | NEW |