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

Side by Side Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 2336803003: Make SyntheticPointerAction to flush the pointer action sequence (Closed)
Patch Set: pointer controller Created 4 years, 1 month 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
OLDNEW
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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { 946 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: {
947 content::SyntheticTapGestureParams* params = 947 content::SyntheticTapGestureParams* params =
948 new content::SyntheticTapGestureParams(); 948 new content::SyntheticTapGestureParams();
949 if (!FuzzParam(&params->position, fuzzer)) 949 if (!FuzzParam(&params->position, fuzzer))
950 return false; 950 return false;
951 if (!FuzzParam(&params->duration_ms, fuzzer)) 951 if (!FuzzParam(&params->duration_ms, fuzzer))
952 return false; 952 return false;
953 gesture_params.reset(params); 953 gesture_params.reset(params);
954 break; 954 break;
955 } 955 }
956 case content::SyntheticGestureParams::GestureType::POINTER_ACTION: { 956 case content::SyntheticGestureParams::GestureType::POINTER_ACTION_LIST: {
957 content::SyntheticPointerActionParams::PointerActionType action_type; 957 std::vector<content::SyntheticPointerActionParams> param_list;
958 gfx::PointF position; 958 if (!FuzzParam(&param_list, fuzzer))
959 int index;
960 if (!FuzzParam(&action_type, fuzzer))
961 return false; 959 return false;
962 if (!FuzzParam(&position, fuzzer)) 960 content::SyntheticPointerActionListParams* params =
963 return false; 961 new content::SyntheticPointerActionListParams();
964 if (!FuzzParam(&index, fuzzer)) 962 params->param_list = param_list;
965 return false;
966 content::SyntheticPointerActionParams* params =
967 new content::SyntheticPointerActionParams(action_type);
968 params->set_position(position);
969 params->set_index(index);
970 gesture_params.reset(params); 963 gesture_params.reset(params);
971 break; 964 break;
972 } 965 }
973 } 966 }
974 p->set_gesture_params(std::move(gesture_params)); 967 p->set_gesture_params(std::move(gesture_params));
975 return true; 968 return true;
976 } 969 }
977 }; 970 };
978 971
979 template <> 972 template <>
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" 2011 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
2019 #undef IPC_MESSAGE_DECL 2012 #undef IPC_MESSAGE_DECL
2020 #define IPC_MESSAGE_DECL(name, ...) \ 2013 #define IPC_MESSAGE_DECL(name, ...) \
2021 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; 2014 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz;
2022 2015
2023 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { 2016 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) {
2024 #include "tools/ipc_fuzzer/message_lib/all_messages.h" 2017 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
2025 } 2018 }
2026 2019
2027 } // namespace ipc_fuzzer 2020 } // namespace ipc_fuzzer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698