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

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

Issue 1819533002: Convert ScopedVector<DisplayPlacement> to std::vector<DisplayPlacement> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jsonrefactor
Patch Set: Created 4 years, 9 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 | « ash/display/display_manager.cc ('k') | ash/display/extended_mouse_warp_controller.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 "ash/accelerators/accelerator_commands.h" 7 #include "ash/accelerators/accelerator_commands.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/display/display_info.h" 9 #include "ash/display/display_info.h"
10 #include "ash/display/display_layout_builder.h" 10 #include "ash/display/display_layout_builder.h"
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 2196
2197 EXPECT_EQ(good->ToString(), 2197 EXPECT_EQ(good->ToString(),
2198 layout_store->GetRegisteredDisplayLayout(good_list).ToString()); 2198 layout_store->GetRegisteredDisplayLayout(good_list).ToString());
2199 } 2199 }
2200 2200
2201 TEST_F(DisplayManagerTest, GuessDisplayIdFieldsInDisplayLayout) { 2201 TEST_F(DisplayManagerTest, GuessDisplayIdFieldsInDisplayLayout) {
2202 int64_t id1 = 10001; 2202 int64_t id1 = 10001;
2203 int64_t id2 = 10002; 2203 int64_t id2 = 10002;
2204 2204
2205 scoped_ptr<DisplayLayout> old_layout(new DisplayLayout); 2205 scoped_ptr<DisplayLayout> old_layout(new DisplayLayout);
2206 old_layout->placement_list.push_back( 2206 old_layout->placement_list.emplace_back(DisplayPlacement::BOTTOM, 0);
2207 new DisplayPlacement(DisplayPlacement::BOTTOM, 0));
2208 old_layout->primary_id = id1; 2207 old_layout->primary_id = id1;
2209 2208
2210 DisplayLayoutStore* layout_store = display_manager()->layout_store(); 2209 DisplayLayoutStore* layout_store = display_manager()->layout_store();
2211 DisplayIdList list = test::CreateDisplayIdList2(id1, id2); 2210 DisplayIdList list = test::CreateDisplayIdList2(id1, id2);
2212 layout_store->RegisterLayoutForDisplayIdList(list, std::move(old_layout)); 2211 layout_store->RegisterLayoutForDisplayIdList(list, std::move(old_layout));
2213 const DisplayLayout& stored = layout_store->GetRegisteredDisplayLayout(list); 2212 const DisplayLayout& stored = layout_store->GetRegisteredDisplayLayout(list);
2214 2213
2215 EXPECT_EQ(id1, stored.placement_list[0]->parent_display_id); 2214 EXPECT_EQ(id1, stored.placement_list[0].parent_display_id);
2216 EXPECT_EQ(id2, stored.placement_list[0]->display_id); 2215 EXPECT_EQ(id2, stored.placement_list[0].display_id);
2217 } 2216 }
2218 2217
2219 #endif // OS_CHROMEOS 2218 #endif // OS_CHROMEOS
2220 2219
2221 } // namespace ash 2220 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/display/extended_mouse_warp_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698