Index: content/test/fuzzer/origin_trial_token_fuzzer.cc |
diff --git a/testing/libfuzzer/fuzzers/url_parse_fuzzer.cc b/content/test/fuzzer/origin_trial_token_fuzzer.cc |
similarity index 64% |
copy from testing/libfuzzer/fuzzers/url_parse_fuzzer.cc |
copy to content/test/fuzzer/origin_trial_token_fuzzer.cc |
index e2e814da6e1e6cd70589416d0189a4b00d6dfa2f..8d8ccb619795d6ac132a8ec7171dd8abf40fb616 100644 |
--- a/testing/libfuzzer/fuzzers/url_parse_fuzzer.cc |
+++ b/content/test/fuzzer/origin_trial_token_fuzzer.cc |
@@ -1,12 +1,15 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "content/common/origin_trials/trial_token.h" |
+ |
#include <stddef.h> |
#include <stdint.h> |
#include "base/at_exit.h" |
#include "base/i18n/icu_util.h" |
+#include "content/test/fuzzer/fuzzer_support.h" |
#include "url/gurl.h" |
struct TestCase { |
@@ -22,6 +25,7 @@ TestCase* test_case = new TestCase(); |
// Entry point for LibFuzzer. |
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
- GURL url(std::string(reinterpret_cast<const char*>(data), size)); |
+ content::TrialToken::Parse(std::string(reinterpret_cast<const char*>(data), |
+ size)); |
return 0; |
} |