OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/content/shell_content_state.h" | 8 #include "ash/content/shell_content_state.h" |
9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 display_info_list_two_active.push_back(internal_display_info); | 632 display_info_list_two_active.push_back(internal_display_info); |
633 display_info_list_two_active.push_back(external_display_info); | 633 display_info_list_two_active.push_back(external_display_info); |
634 | 634 |
635 std::vector<DisplayInfo> display_info_list_one_active; | 635 std::vector<DisplayInfo> display_info_list_one_active; |
636 display_info_list_one_active.push_back(external_display_info); | 636 display_info_list_one_active.push_back(external_display_info); |
637 | 637 |
638 // The DisplayInfo list with two active displays needs to be added first so | 638 // The DisplayInfo list with two active displays needs to be added first so |
639 // that the DisplayManager can track the |internal_display_info| as inactive | 639 // that the DisplayManager can track the |internal_display_info| as inactive |
640 // instead of non-existent. | 640 // instead of non-existent. |
641 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 641 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
642 display_manager->UpdateDisplays(display_info_list_two_active); | 642 display_manager->UpdateDisplaysWith(display_info_list_two_active); |
643 display_manager->UpdateDisplays(display_info_list_one_active); | 643 display_manager->UpdateDisplaysWith(display_info_list_one_active); |
644 | 644 |
645 test::ScopedSetInternalDisplayId set_internal(kInternalDisplayId); | 645 test::ScopedSetInternalDisplayId set_internal(kInternalDisplayId); |
646 | 646 |
647 ASSERT_NE(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) | 647 ASSERT_NE(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) |
648 .GetActiveRotation()); | 648 .GetActiveRotation()); |
649 | 649 |
650 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation( | 650 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation( |
651 kNewRotation, gfx::Display::ROTATION_SOURCE_ACTIVE); | 651 kNewRotation, gfx::Display::ROTATION_SOURCE_ACTIVE); |
652 | 652 |
653 EXPECT_EQ(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) | 653 EXPECT_EQ(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) |
654 .GetActiveRotation()); | 654 .GetActiveRotation()); |
655 } | 655 } |
656 | 656 |
657 } // namespace ash | 657 } // namespace ash |
OLD | NEW |