OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <iostream> | 5 #include <iostream> |
6 #include <set> | 6 #include <set> |
7 #include <string> | 7 #include <string> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { | 969 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { |
970 content::SyntheticTapGestureParams* params = | 970 content::SyntheticTapGestureParams* params = |
971 new content::SyntheticTapGestureParams(); | 971 new content::SyntheticTapGestureParams(); |
972 if (!FuzzParam(¶ms->position, fuzzer)) | 972 if (!FuzzParam(¶ms->position, fuzzer)) |
973 return false; | 973 return false; |
974 if (!FuzzParam(¶ms->duration_ms, fuzzer)) | 974 if (!FuzzParam(¶ms->duration_ms, fuzzer)) |
975 return false; | 975 return false; |
976 gesture_params.reset(params); | 976 gesture_params.reset(params); |
977 break; | 977 break; |
978 } | 978 } |
| 979 case content::SyntheticGestureParams::GestureType::POINTER_ACTION: { |
| 980 content::SyntheticPointerActionParams::PointerActionType action_type; |
| 981 gfx::PointF position; |
| 982 int index; |
| 983 if (!FuzzParam(&action_type, fuzzer)) |
| 984 return false; |
| 985 if (!FuzzParam(&position, fuzzer)) |
| 986 return false; |
| 987 if (!FuzzParam(&index, fuzzer)) |
| 988 return false; |
| 989 content::SyntheticPointerActionParams* params = |
| 990 new content::SyntheticPointerActionParams(action_type); |
| 991 params->set_position(position); |
| 992 params->set_index(index); |
| 993 gesture_params.reset(params); |
| 994 break; |
| 995 } |
979 } | 996 } |
980 p->set_gesture_params(std::move(gesture_params)); | 997 p->set_gesture_params(std::move(gesture_params)); |
981 return true; | 998 return true; |
982 } | 999 } |
983 }; | 1000 }; |
984 | 1001 |
985 template <> | 1002 template <> |
986 struct FuzzTraits<content::WebCursor> { | 1003 struct FuzzTraits<content::WebCursor> { |
987 static bool Fuzz(content::WebCursor* p, Fuzzer* fuzzer) { | 1004 static bool Fuzz(content::WebCursor* p, Fuzzer* fuzzer) { |
988 content::WebCursor::CursorInfo info; | 1005 content::WebCursor::CursorInfo info; |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 2041 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
2025 #undef IPC_MESSAGE_DECL | 2042 #undef IPC_MESSAGE_DECL |
2026 #define IPC_MESSAGE_DECL(name, ...) \ | 2043 #define IPC_MESSAGE_DECL(name, ...) \ |
2027 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; | 2044 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; |
2028 | 2045 |
2029 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 2046 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
2030 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 2047 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
2031 } | 2048 } |
2032 | 2049 |
2033 } // namespace ipc_fuzzer | 2050 } // namespace ipc_fuzzer |
OLD | NEW |