Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: ash/content/display/screen_orientation_controller_chromeos_unittest.cc

Issue 1631023002: Fix moving the mouse between two displays after the secondary display becomes primary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rename UpdateDisplaysTo to UpdateDisplaysWith Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/display/display_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698