OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/testing/BlinkFuzzerTestSupport.h" |
| 6 #include "public/platform/WebIconSizesParser.h" |
| 7 #include "public/platform/WebSize.h" |
| 8 #include "public/platform/WebString.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // Fuzzer for blink::MHTMLParser. |
| 13 int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) |
| 14 { |
| 15 WebString string = WebString::fromUTF8( |
| 16 reinterpret_cast<const char*>(data), size); |
| 17 WebIconSizesParser::parseIconSizes(string); |
| 18 return 0; |
| 19 } |
| 20 |
| 21 } // namespace blink |
| 22 |
| 23 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) |
| 24 { |
| 25 return blink::LLVMFuzzerTestOneInput(data, size); |
| 26 } |
| 27 |
| 28 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) |
| 29 { |
| 30 blink::InitializeBlinkFuzzTest(argc, argv); |
| 31 return 0; |
| 32 } |
OLD | NEW |