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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { | 821 case content::SyntheticGestureParams::GestureType::TAP_GESTURE: { |
822 content::SyntheticTapGestureParams* params = | 822 content::SyntheticTapGestureParams* params = |
823 new content::SyntheticTapGestureParams(); | 823 new content::SyntheticTapGestureParams(); |
824 if (!FuzzParam(¶ms->position, fuzzer)) | 824 if (!FuzzParam(¶ms->position, fuzzer)) |
825 return false; | 825 return false; |
826 if (!FuzzParam(¶ms->duration_ms, fuzzer)) | 826 if (!FuzzParam(¶ms->duration_ms, fuzzer)) |
827 return false; | 827 return false; |
828 gesture_params.reset(params); | 828 gesture_params.reset(params); |
829 break; | 829 break; |
830 } | 830 } |
831 case content::SyntheticGestureParams::GestureType::POINTER_ACTION: { | 831 case content::SyntheticGestureParams::GestureType::POINTER_ACTION_LIST: { |
832 content::SyntheticPointerActionParams::PointerActionType action_type; | 832 std::vector<content::SyntheticPointerActionListParams::ParamList> |
833 gfx::PointF position; | 833 param_list; |
834 int index; | 834 if (!FuzzParam(¶m_list, fuzzer)) |
835 if (!FuzzParam(&action_type, fuzzer)) | |
836 return false; | 835 return false; |
837 if (!FuzzParam(&position, fuzzer)) | 836 content::SyntheticPointerActionListParams* params = |
838 return false; | 837 new content::SyntheticPointerActionListParams(); |
839 if (!FuzzParam(&index, fuzzer)) | 838 params->params = param_list; |
840 return false; | |
841 content::SyntheticPointerActionParams* params = | |
842 new content::SyntheticPointerActionParams(); | |
843 params->set_pointer_action_type(action_type); | |
844 params->set_position(position); | |
845 params->set_index(index); | |
846 gesture_params.reset(params); | 839 gesture_params.reset(params); |
847 break; | 840 break; |
848 } | 841 } |
849 } | 842 } |
850 p->set_gesture_params(std::move(gesture_params)); | 843 p->set_gesture_params(std::move(gesture_params)); |
851 return true; | 844 return true; |
852 } | 845 } |
853 }; | 846 }; |
854 | 847 |
855 template <> | 848 template <> |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 1878 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
1886 #undef IPC_MESSAGE_DECL | 1879 #undef IPC_MESSAGE_DECL |
1887 #define IPC_MESSAGE_DECL(name, ...) \ | 1880 #define IPC_MESSAGE_DECL(name, ...) \ |
1888 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; | 1881 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; |
1889 | 1882 |
1890 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 1883 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
1891 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 1884 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
1892 } | 1885 } |
1893 | 1886 |
1894 } // namespace ipc_fuzzer | 1887 } // namespace ipc_fuzzer |
OLD | NEW |