| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/events/test/motion_event_test_utils.h" | 5 #include "ui/events/test/motion_event_test_utils.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/events/base_event_utils.h" | 10 #include "ui/events/base_event_utils.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 DCHECK_GE(pi, 0); | 206 DCHECK_GE(pi, 0); |
| 207 pointer_ids.clear_first_marked_bit(); | 207 pointer_ids.clear_first_marked_bit(); |
| 208 ss << "{" | 208 ss << "{" |
| 209 << "\n PointerId: (" << event.GetPointerId(pi) << ")" | 209 << "\n PointerId: (" << event.GetPointerId(pi) << ")" |
| 210 << "\n Pos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" | 210 << "\n Pos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" |
| 211 << "\n RawPos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" | 211 << "\n RawPos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" |
| 212 << "\n Size: (" << event.GetTouchMajor(pi) << ", " | 212 << "\n Size: (" << event.GetTouchMajor(pi) << ", " |
| 213 << event.GetTouchMinor(pi) << ")" | 213 << event.GetTouchMinor(pi) << ")" |
| 214 << "\n Orientation: " << event.GetOrientation(pi) | 214 << "\n Orientation: " << event.GetOrientation(pi) |
| 215 << "\n Pressure: " << event.GetPressure(pi) | 215 << "\n Pressure: " << event.GetPressure(pi) |
| 216 // TODO(e_hakkinen): Remove GetTilt and GetTiltOrientation or GetTiltX |
| 217 // and GetTiltY. |
| 218 << "\n Tilt: (" << event.GetTilt(pi) << ", " |
| 219 << event.GetTiltOrientation(pi) << "; " |
| 220 << event.GetTiltX(pi) << ", " |
| 221 << event.GetTiltY(pi) << ")" |
| 216 << "\n Tool: " << event.GetToolType(pi); | 222 << "\n Tool: " << event.GetToolType(pi); |
| 217 if (history_size) { | 223 if (history_size) { |
| 218 ss << "\n History: ["; | 224 ss << "\n History: ["; |
| 219 for (size_t h = 0; h < history_size; ++h) { | 225 for (size_t h = 0; h < history_size; ++h) { |
| 220 ss << "\n { " << event.GetHistoricalX(pi, h) << ", " | 226 ss << "\n { " << event.GetHistoricalX(pi, h) << ", " |
| 221 << event.GetHistoricalY(pi, h) << ", " | 227 << event.GetHistoricalY(pi, h) << ", " |
| 222 << event.GetHistoricalTouchMajor(pi, h) << ", " | 228 << event.GetHistoricalTouchMajor(pi, h) << ", " |
| 223 << event.GetHistoricalEventTime(pi).ToInternalValue() << " }"; | 229 << event.GetHistoricalEventTime(pi).ToInternalValue() << " }"; |
| 224 if (h + 1 < history_size) | 230 if (h + 1 < history_size) |
| 225 ss << ","; | 231 ss << ","; |
| 226 } | 232 } |
| 227 ss << "\n ]"; | 233 ss << "\n ]"; |
| 228 } | 234 } |
| 229 ss << "\n }"; | 235 ss << "\n }"; |
| 230 if (i + 1 < pointer_count) | 236 if (i + 1 < pointer_count) |
| 231 ss << ", "; | 237 ss << ", "; |
| 232 } | 238 } |
| 233 ss << "]\n}"; | 239 ss << "]\n}"; |
| 234 } | 240 } |
| 235 | 241 |
| 236 return ss.str(); | 242 return ss.str(); |
| 237 } | 243 } |
| 238 | 244 |
| 239 } // namespace test | 245 } // namespace test |
| 240 } // namespace ui | 246 } // namespace ui |
| OLD | NEW |