| 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 << "\n Tilt: " << event.GetTilt(pi) |
| 216 << "\n Tool: " << event.GetToolType(pi); | 217 << "\n Tool: " << event.GetToolType(pi); |
| 217 if (history_size) { | 218 if (history_size) { |
| 218 ss << "\n History: ["; | 219 ss << "\n History: ["; |
| 219 for (size_t h = 0; h < history_size; ++h) { | 220 for (size_t h = 0; h < history_size; ++h) { |
| 220 ss << "\n { " << event.GetHistoricalX(pi, h) << ", " | 221 ss << "\n { " << event.GetHistoricalX(pi, h) << ", " |
| 221 << event.GetHistoricalY(pi, h) << ", " | 222 << event.GetHistoricalY(pi, h) << ", " |
| 222 << event.GetHistoricalTouchMajor(pi, h) << ", " | 223 << event.GetHistoricalTouchMajor(pi, h) << ", " |
| 223 << event.GetHistoricalEventTime(pi).ToInternalValue() << " }"; | 224 << event.GetHistoricalEventTime(pi).ToInternalValue() << " }"; |
| 224 if (h + 1 < history_size) | 225 if (h + 1 < history_size) |
| 225 ss << ","; | 226 ss << ","; |
| 226 } | 227 } |
| 227 ss << "\n ]"; | 228 ss << "\n ]"; |
| 228 } | 229 } |
| 229 ss << "\n }"; | 230 ss << "\n }"; |
| 230 if (i + 1 < pointer_count) | 231 if (i + 1 < pointer_count) |
| 231 ss << ", "; | 232 ss << ", "; |
| 232 } | 233 } |
| 233 ss << "]\n}"; | 234 ss << "]\n}"; |
| 234 } | 235 } |
| 235 | 236 |
| 236 return ss.str(); | 237 return ss.str(); |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace test | 240 } // namespace test |
| 240 } // namespace ui | 241 } // namespace ui |
| OLD | NEW |