OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/at_exit.h" |
| 6 #include "base/i18n/icu_util.h" |
5 #include "url/gurl.h" | 7 #include "url/gurl.h" |
6 | 8 |
| 9 struct TestCase { |
| 10 TestCase() { |
| 11 CHECK(base::i18n::InitializeICU()); |
| 12 } |
| 13 |
| 14 // used by ICU integration. |
| 15 base::AtExitManager at_exit_manager; |
| 16 }; |
| 17 |
| 18 TestCase* test_case = new TestCase(); |
| 19 |
7 // Entry point for LibFuzzer. | 20 // Entry point for LibFuzzer. |
8 extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, | 21 extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, |
9 unsigned long size) { | 22 unsigned long size) { |
10 GURL url(std::string(reinterpret_cast<const char*>(data), size)); | 23 GURL url(std::string(reinterpret_cast<const char*>(data), size)); |
11 return 0; | 24 return 0; |
12 } | 25 } |
OLD | NEW |