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

Side by Side Diff: ash/display/display_manager.cc

Issue 16539005: Skip mulitple-dispay tests on win8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_error_dialog_unittest.cc ('k') | ash/display/display_manager_unittest.cc » ('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 (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_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 for (DisplayList::const_iterator iter = displays_.begin(); 414 for (DisplayList::const_iterator iter = displays_.begin();
415 iter != displays_.end(); ++iter) { 415 iter != displays_.end(); ++iter) {
416 display_info_list.push_back(GetDisplayInfo(iter->id())); 416 display_info_list.push_back(GetDisplayInfo(iter->id()));
417 } 417 }
418 AddMirrorDisplayInfoIfAny(&display_info_list); 418 AddMirrorDisplayInfoIfAny(&display_info_list);
419 UpdateDisplays(display_info_list); 419 UpdateDisplays(display_info_list);
420 } 420 }
421 421
422 void DisplayManager::UpdateDisplays( 422 void DisplayManager::UpdateDisplays(
423 const std::vector<DisplayInfo>& updated_display_info_list) { 423 const std::vector<DisplayInfo>& updated_display_info_list) {
424 #if defined(OS_WIN)
425 if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
426 DCHECK_EQ(1u, updated_display_info_list.size()) <<
427 "Multiple display test does not work on Win8 bots. Please "
428 "skip (don't disable) the test using |SupportMultipleDisplay()|";
429 }
430 #endif
431
424 DisplayInfoList new_display_info_list = updated_display_info_list; 432 DisplayInfoList new_display_info_list = updated_display_info_list;
425 std::sort(displays_.begin(), displays_.end(), DisplaySortFunctor()); 433 std::sort(displays_.begin(), displays_.end(), DisplaySortFunctor());
426 std::sort(new_display_info_list.begin(), 434 std::sort(new_display_info_list.begin(),
427 new_display_info_list.end(), 435 new_display_info_list.end(),
428 DisplayInfoSortFunctor()); 436 DisplayInfoSortFunctor());
429 DisplayList removed_displays; 437 DisplayList removed_displays;
430 std::vector<size_t> changed_display_indices; 438 std::vector<size_t> changed_display_indices;
431 std::vector<size_t> added_display_indices; 439 std::vector<size_t> added_display_indices;
432 440
433 DisplayList::iterator curr_iter = displays_.begin(); 441 DisplayList::iterator curr_iter = displays_.begin();
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 // always (0,0) and the secondary display's bounds will be updated 863 // always (0,0) and the secondary display's bounds will be updated
856 // by |DisplayController::UpdateDisplayBoundsForLayout|. 864 // by |DisplayController::UpdateDisplayBoundsForLayout|.
857 new_display.SetScaleAndBounds( 865 new_display.SetScaleAndBounds(
858 display_info.device_scale_factor(), gfx::Rect(bounds_in_pixel.size())); 866 display_info.device_scale_factor(), gfx::Rect(bounds_in_pixel.size()));
859 new_display.set_rotation(display_info.rotation()); 867 new_display.set_rotation(display_info.rotation());
860 return new_display; 868 return new_display;
861 } 869 }
862 870
863 } // namespace internal 871 } // namespace internal
864 } // namespace ash 872 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_error_dialog_unittest.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698