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

Unified Diff: ash/test/display_manager_test_api.cc

Issue 1130653004: Remove the removed display from the active list after displays are added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/display_manager_test_api.cc
diff --git a/ash/test/display_manager_test_api.cc b/ash/test/display_manager_test_api.cc
index b2c169021512bb96dcf9e279c0695da4acd97e51..a52ec03f3e7fdc925d64f829cc4e761d72e3ddd0 100644
--- a/ash/test/display_manager_test_api.cc
+++ b/ash/test/display_manager_test_api.cc
@@ -34,11 +34,16 @@ std::vector<DisplayInfo> CreateDisplayInfoListFromString(
std::vector<std::string> parts;
base::SplitString(specs, ',', &parts);
size_t index = 0;
+
+ DisplayManager::DisplayList list =
+ display_manager->IsInUnifiedMode()
+ ? display_manager->software_mirroring_display_list()
+ : display_manager->active_display_list();
+
for (std::vector<std::string>::const_iterator iter = parts.begin();
iter != parts.end(); ++iter, ++index) {
- int64 id = index < display_manager->GetNumDisplays() ?
- display_manager->GetDisplayAt(index).id() :
- gfx::Display::kInvalidDisplayID;
+ int64 id = (index < list.size()) ? list[index].id()
+ : gfx::Display::kInvalidDisplayID;
display_info_list.push_back(
DisplayInfo::CreateFromSpecWithID(*iter, id));
}
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698