| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 DCHECK_GE(pi, 0); | 227 DCHECK_GE(pi, 0); |
| 228 pointer_ids.clear_first_marked_bit(); | 228 pointer_ids.clear_first_marked_bit(); |
| 229 ss << "{" | 229 ss << "{" |
| 230 << "\n PointerId: (" << event.GetPointerId(pi) << ")" | 230 << "\n PointerId: (" << event.GetPointerId(pi) << ")" |
| 231 << "\n Pos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" | 231 << "\n Pos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" |
| 232 << "\n RawPos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" | 232 << "\n RawPos: (" << event.GetX(pi) << ", " << event.GetY(pi) << ")" |
| 233 << "\n Size: (" << event.GetTouchMajor(pi) << ", " | 233 << "\n Size: (" << event.GetTouchMajor(pi) << ", " |
| 234 << event.GetTouchMinor(pi) << ")" | 234 << event.GetTouchMinor(pi) << ")" |
| 235 << "\n Orientation: " << event.GetOrientation(pi) | 235 << "\n Orientation: " << event.GetOrientation(pi) |
| 236 << "\n Pressure: " << event.GetPressure(pi) | 236 << "\n Pressure: " << event.GetPressure(pi) |
| 237 << "\n Tilt: " << event.GetTilt(pi) | 237 << "\n TiltX: " << event.GetTiltX(pi) |
| 238 << "\n TiltY: " << event.GetTiltY(pi) |
| 238 << "\n Tool: " << event.GetToolType(pi); | 239 << "\n Tool: " << event.GetToolType(pi); |
| 239 if (history_size) { | 240 if (history_size) { |
| 240 ss << "\n History: ["; | 241 ss << "\n History: ["; |
| 241 for (size_t h = 0; h < history_size; ++h) { | 242 for (size_t h = 0; h < history_size; ++h) { |
| 242 ss << "\n { " << event.GetHistoricalX(pi, h) << ", " | 243 ss << "\n { " << event.GetHistoricalX(pi, h) << ", " |
| 243 << event.GetHistoricalY(pi, h) << ", " | 244 << event.GetHistoricalY(pi, h) << ", " |
| 244 << event.GetHistoricalTouchMajor(pi, h) << ", " | 245 << event.GetHistoricalTouchMajor(pi, h) << ", " |
| 245 << event.GetHistoricalEventTime(pi).ToInternalValue() << " }"; | 246 << event.GetHistoricalEventTime(pi).ToInternalValue() << " }"; |
| 246 if (h + 1 < history_size) | 247 if (h + 1 < history_size) |
| 247 ss << ","; | 248 ss << ","; |
| 248 } | 249 } |
| 249 ss << "\n ]"; | 250 ss << "\n ]"; |
| 250 } | 251 } |
| 251 ss << "\n }"; | 252 ss << "\n }"; |
| 252 if (i + 1 < pointer_count) | 253 if (i + 1 < pointer_count) |
| 253 ss << ", "; | 254 ss << ", "; |
| 254 } | 255 } |
| 255 ss << "]\n}"; | 256 ss << "]\n}"; |
| 256 } | 257 } |
| 257 | 258 |
| 258 return ss.str(); | 259 return ss.str(); |
| 259 } | 260 } |
| 260 | 261 |
| 261 } // namespace test | 262 } // namespace test |
| 262 } // namespace ui | 263 } // namespace ui |
| OLD | NEW |