Commit a024d5e4 authored by Thanh Nguyen's avatar Thanh Nguyen Committed by Commit Bot

Fix build for tokenized_string_fuzzer

Bug: 1105896
Change-Id: I426f48b4d15b767f4eed2f0a5433efcde7d7bb7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299822
Commit-Queue: Thanh Nguyen <thanhdng@chromium.org>
Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788897}
parent df303296
...@@ -6882,16 +6882,6 @@ if (is_win) { ...@@ -6882,16 +6882,6 @@ if (is_win) {
} }
} }
if (is_chromeos) {
fuzzer_test("tokenized_string_fuzzer") {
sources = [ "../common/string_matching/tokenized_string_fuzzer.cc" ]
deps = [
"//base",
"//chrome/common/string_matching",
]
}
}
if (is_win) { if (is_win) {
test("pixel_browser_tests") { test("pixel_browser_tests") {
sources = [ "pixel/demo/skia_gold_demo_pixeltest.cc" ] sources = [ "pixel/demo/skia_gold_demo_pixeltest.cc" ]
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//testing/libfuzzer/fuzzer_test.gni")
assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos") assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")
source_set("string_matching") { source_set("string_matching") {
...@@ -50,3 +52,11 @@ source_set("unit_tests") { ...@@ -50,3 +52,11 @@ source_set("unit_tests") {
"//testing/gtest", "//testing/gtest",
] ]
} }
fuzzer_test("tokenized_string_fuzzer") {
sources = [ "tokenized_string_fuzzer.cc" ]
deps = [
":string_matching",
"//base",
]
}
...@@ -12,6 +12,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { ...@@ -12,6 +12,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Test for base::string16 if size is even. // Test for base::string16 if size is even.
base::string16 string_input16(reinterpret_cast<const base::char16*>(data), base::string16 string_input16(reinterpret_cast<const base::char16*>(data),
size / 2); size / 2);
TokenizedString tokenized_string_from_string16(string_input16); chromeos::string_matching::TokenizedString tokenized_string_from_string16(
string_input16);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment