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