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

Side by Side Diff: ui/display/test/display_manager_test_api.cc

Issue 2694623016: chromeos: Makes AshTestBase/Helper target mash when appropriate (Closed)
Patch Set: feedback Created 3 years, 10 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 | « mash/test/mash_test_suite.cc ('k') | no next file » | 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 "ui/display/test/display_manager_test_api.h" 5 #include "ui/display/test/display_manager_test_api.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return mode->ui_scale() == ui_scale; 51 return mode->ui_scale() == ui_scale;
52 }); 52 });
53 if (iter == modes.end()) 53 if (iter == modes.end())
54 return scoped_refptr<ManagedDisplayMode>(); 54 return scoped_refptr<ManagedDisplayMode>();
55 return *iter; 55 return *iter;
56 } 56 }
57 57
58 } // namespace 58 } // namespace
59 59
60 DisplayManagerTestApi::DisplayManagerTestApi(DisplayManager* display_manager) 60 DisplayManagerTestApi::DisplayManagerTestApi(DisplayManager* display_manager)
61 : display_manager_(display_manager) {} 61 : display_manager_(display_manager) {
62 DCHECK(display_manager);
63 }
62 64
63 DisplayManagerTestApi::~DisplayManagerTestApi() {} 65 DisplayManagerTestApi::~DisplayManagerTestApi() {}
64 66
65 void DisplayManagerTestApi::UpdateDisplay(const std::string& display_specs) { 67 void DisplayManagerTestApi::UpdateDisplay(const std::string& display_specs) {
66 DisplayInfoList display_info_list = 68 DisplayInfoList display_info_list =
67 CreateDisplayInfoListFromString(display_specs, display_manager_); 69 CreateDisplayInfoListFromString(display_specs, display_manager_);
68 bool is_host_origin_set = false; 70 bool is_host_origin_set = false;
69 for (size_t i = 0; i < display_info_list.size(); ++i) { 71 for (size_t i = 0; i < display_info_list.size(); ++i) {
70 const ManagedDisplayInfo& display_info = display_info_list[i]; 72 const ManagedDisplayInfo& display_info = display_info_list[i];
71 if (display_info.bounds_in_native().origin() != gfx::Point(0, 0)) { 73 if (display_info.bounds_in_native().origin() != gfx::Point(0, 0)) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 for (size_t i = 0; i < count; i++) { 201 for (size_t i = 0; i < count; i++) {
200 int64_t id = va_arg(args, int64_t); 202 int64_t id = va_arg(args, int64_t);
201 list.push_back(id); 203 list.push_back(id);
202 } 204 }
203 SortDisplayIdList(&list); 205 SortDisplayIdList(&list);
204 return list; 206 return list;
205 } 207 }
206 208
207 } // namespace test 209 } // namespace test
208 } // namespace display 210 } // namespace display
OLDNEW
« no previous file with comments | « mash/test/mash_test_suite.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698