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

Side by Side Diff: ui/display/manager/managed_display_info_unittest.cc

Issue 2540383002: Updates display manager and display preferences to handle touch calibration data. (Closed)
Patch Set: Merge with ToT Created 4 years 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 | « ui/display/manager/managed_display_info.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/manager/managed_display_info.h" 5 #include "ui/display/manager/managed_display_info.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace display { 9 namespace display {
10 namespace { 10 namespace {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 }}; 161 }};
162 162
163 gfx::Size size(200, 100); 163 gfx::Size size(200, 100);
164 164
165 TouchCalibrationData expected_data(points, size); 165 TouchCalibrationData expected_data(points, size);
166 166
167 // Add touch data for the display. 167 // Add touch data for the display.
168 info.SetTouchCalibrationData(expected_data); 168 info.SetTouchCalibrationData(expected_data);
169 169
170 EXPECT_TRUE(info.has_touch_calibration_data()); 170 EXPECT_TRUE(info.has_touch_calibration_data());
171 TouchCalibrationData actual_data = info.GetTouchCalibrationData(); 171 EXPECT_EQ(expected_data, info.GetTouchCalibrationData());
172 EXPECT_EQ(actual_data.bounds, size);
173 for (size_t i = 0; i < expected_data.point_pairs.size(); i++) {
174 EXPECT_EQ(actual_data.point_pairs[i].first,
175 expected_data.point_pairs[i].first);
176
177 EXPECT_EQ(actual_data.point_pairs[i].second,
178 expected_data.point_pairs[i].second);
179 }
180 172
181 // Clear all touch calibration data for the display. 173 // Clear all touch calibration data for the display.
182 info.clear_touch_calibration_data(); 174 info.clear_touch_calibration_data();
183 175
184 EXPECT_FALSE(info.has_touch_calibration_data()); 176 EXPECT_FALSE(info.has_touch_calibration_data());
185 } 177 }
186 178
187 } // namespace display 179 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/manager/managed_display_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698