| 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 } | 802 } |
| 803 } | 803 } |
| 804 p->set_gesture_params(std::move(gesture_params)); | 804 p->set_gesture_params(std::move(gesture_params)); |
| 805 return true; | 805 return true; |
| 806 } | 806 } |
| 807 }; | 807 }; |
| 808 | 808 |
| 809 template <> | 809 template <> |
| 810 struct FuzzTraits<content::WebCursor> { | 810 struct FuzzTraits<content::WebCursor> { |
| 811 static bool Fuzz(content::WebCursor* p, Fuzzer* fuzzer) { | 811 static bool Fuzz(content::WebCursor* p, Fuzzer* fuzzer) { |
| 812 content::WebCursor::CursorInfo info; | 812 content::CursorInfo info; |
| 813 p->GetCursorInfo(&info); | 813 p->GetCursorInfo(&info); |
| 814 | 814 |
| 815 // |type| enum is not validated on de-serialization, so pick random value. | 815 // |type| enum is not validated on de-serialization, so pick random value. |
| 816 if (!FuzzParam(reinterpret_cast<int*>(&info.type), fuzzer)) | 816 if (!FuzzParam(reinterpret_cast<int*>(&info.type), fuzzer)) |
| 817 return false; | 817 return false; |
| 818 if (!FuzzParam(&info.hotspot, fuzzer)) | 818 if (!FuzzParam(&info.hotspot, fuzzer)) |
| 819 return false; | 819 return false; |
| 820 if (!FuzzParam(&info.image_scale_factor, fuzzer)) | 820 if (!FuzzParam(&info.image_scale_factor, fuzzer)) |
| 821 return false; | 821 return false; |
| 822 if (!FuzzParam(&info.custom_image, fuzzer)) | 822 if (!FuzzParam(&info.custom_image, fuzzer)) |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1822 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 1822 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
| 1823 #undef IPC_MESSAGE_DECL | 1823 #undef IPC_MESSAGE_DECL |
| 1824 #define IPC_MESSAGE_DECL(name, ...) \ | 1824 #define IPC_MESSAGE_DECL(name, ...) \ |
| 1825 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; | 1825 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; |
| 1826 | 1826 |
| 1827 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 1827 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
| 1828 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 1828 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
| 1829 } | 1829 } |
| 1830 | 1830 |
| 1831 } // namespace ipc_fuzzer | 1831 } // namespace ipc_fuzzer |
| OLD | NEW |