| 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 <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 case 2: { | 903 case 2: { |
| 904 *p = content::IndexedDBKeyPath(); | 904 *p = content::IndexedDBKeyPath(); |
| 905 break; | 905 break; |
| 906 } | 906 } |
| 907 } | 907 } |
| 908 return true; | 908 return true; |
| 909 } | 909 } |
| 910 }; | 910 }; |
| 911 | 911 |
| 912 template <> | 912 template <> |
| 913 struct FuzzTraits<content::NPIdentifier_Param> { | |
| 914 static bool Fuzz(content::NPIdentifier_Param* p, Fuzzer* fuzzer) { | |
| 915 // TODO(mbarbella): This should actually do something. | |
| 916 return true; | |
| 917 } | |
| 918 }; | |
| 919 | |
| 920 template <> | |
| 921 struct FuzzTraits<content::NPVariant_Param> { | |
| 922 static bool Fuzz(content::NPVariant_Param* p, Fuzzer* fuzzer) { | |
| 923 // TODO(mbarbella): This should actually do something. | |
| 924 return true; | |
| 925 } | |
| 926 }; | |
| 927 | |
| 928 template <> | |
| 929 struct FuzzTraits<content::PageState> { | 913 struct FuzzTraits<content::PageState> { |
| 930 static bool Fuzz(content::PageState* p, Fuzzer* fuzzer) { | 914 static bool Fuzz(content::PageState* p, Fuzzer* fuzzer) { |
| 931 std::string data = p->ToEncodedData(); | 915 std::string data = p->ToEncodedData(); |
| 932 if (!FuzzParam(&data, fuzzer)) | 916 if (!FuzzParam(&data, fuzzer)) |
| 933 return false; | 917 return false; |
| 934 *p = content::PageState::CreateFromEncodedData(data); | 918 *p = content::PageState::CreateFromEncodedData(data); |
| 935 return true; | 919 return true; |
| 936 } | 920 } |
| 937 }; | 921 }; |
| 938 | 922 |
| (...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2139 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 2123 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
| 2140 #undef IPC_MESSAGE_DECL | 2124 #undef IPC_MESSAGE_DECL |
| 2141 #define IPC_MESSAGE_DECL(name, ...) \ | 2125 #define IPC_MESSAGE_DECL(name, ...) \ |
| 2142 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; | 2126 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; |
| 2143 | 2127 |
| 2144 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 2128 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
| 2145 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 2129 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
| 2146 } | 2130 } |
| 2147 | 2131 |
| 2148 } // namespace ipc_fuzzer | 2132 } // namespace ipc_fuzzer |
| OLD | NEW |