| 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { | 783 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { |
| 784 content::SyntheticTapGestureParams* params = | 784 content::SyntheticTapGestureParams* params = |
| 785 new content::SyntheticTapGestureParams(); | 785 new content::SyntheticTapGestureParams(); |
| 786 if (!FuzzParam(¶ms->position, fuzzer)) | 786 if (!FuzzParam(¶ms->position, fuzzer)) |
| 787 return false; | 787 return false; |
| 788 if (!FuzzParam(¶ms->duration_ms, fuzzer)) | 788 if (!FuzzParam(¶ms->duration_ms, fuzzer)) |
| 789 return false; | 789 return false; |
| 790 gesture_params.reset(params); | 790 gesture_params.reset(params); |
| 791 break; | 791 break; |
| 792 } | 792 } |
| 793 case content::SyntheticGestureParams::GestureType::POINTER_ACTION: { | 793 case content::SyntheticGestureParams::GestureType::POINTER_ACTION_LIST: { |
| 794 content::SyntheticPointerActionParams::PointerActionType action_type; | 794 std::vector<content::SyntheticPointerActionListParams::ParamList> |
| 795 gfx::PointF position; | 795 param_list; |
| 796 int index; | 796 if (!FuzzParam(¶m_list, fuzzer)) |
| 797 if (!FuzzParam(&action_type, fuzzer)) | |
| 798 return false; | 797 return false; |
| 799 if (!FuzzParam(&position, fuzzer)) | 798 content::SyntheticPointerActionListParams* params = |
| 800 return false; | 799 new content::SyntheticPointerActionListParams(); |
| 801 if (!FuzzParam(&index, fuzzer)) | 800 params->params = param_list; |
| 802 return false; | |
| 803 content::SyntheticPointerActionParams* params = | |
| 804 new content::SyntheticPointerActionParams(); | |
| 805 params->set_pointer_action_type(action_type); | |
| 806 params->set_position(position); | |
| 807 params->set_index(index); | |
| 808 gesture_params.reset(params); | 801 gesture_params.reset(params); |
| 809 break; | 802 break; |
| 810 } | 803 } |
| 811 } | 804 } |
| 812 p->set_gesture_params(std::move(gesture_params)); | 805 p->set_gesture_params(std::move(gesture_params)); |
| 813 return true; | 806 return true; |
| 814 } | 807 } |
| 815 }; | 808 }; |
| 816 | 809 |
| 817 template <> | 810 template <> |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 1840 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
| 1848 #undef IPC_MESSAGE_DECL | 1841 #undef IPC_MESSAGE_DECL |
| 1849 #define IPC_MESSAGE_DECL(name, ...) \ | 1842 #define IPC_MESSAGE_DECL(name, ...) \ |
| 1850 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; | 1843 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; |
| 1851 | 1844 |
| 1852 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 1845 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
| 1853 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 1846 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
| 1854 } | 1847 } |
| 1855 | 1848 |
| 1856 } // namespace ipc_fuzzer | 1849 } // namespace ipc_fuzzer |
| OLD | NEW |