| # 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. |
| |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| import("//third_party/blink/renderer/core/core.gni") |
| |
| blink_core_sources("parser") { |
| sources = [ |
| "atomic_html_token.cc", |
| "atomic_html_token.h", |
| "background_html_input_stream.cc", |
| "background_html_input_stream.h", |
| "background_html_parser.cc", |
| "background_html_parser.h", |
| "compact_html_token.cc", |
| "compact_html_token.h", |
| "css_preload_scanner.cc", |
| "css_preload_scanner.h", |
| "html_construction_site.cc", |
| "html_construction_site.h", |
| "html_document_parser.cc", |
| "html_document_parser.h", |
| "html_element_stack.cc", |
| "html_element_stack.h", |
| "html_entity_parser.cc", |
| "html_entity_parser.h", |
| "html_entity_search.cc", |
| "html_entity_search.h", |
| "html_entity_table.h", |
| "html_formatting_element_list.cc", |
| "html_formatting_element_list.h", |
| "html_input_stream.h", |
| "html_meta_charset_parser.cc", |
| "html_meta_charset_parser.h", |
| "html_parser_idioms.cc", |
| "html_parser_idioms.h", |
| "html_parser_options.cc", |
| "html_parser_options.h", |
| "html_parser_reentry_permit.cc", |
| "html_parser_reentry_permit.h", |
| "html_parser_scheduler.cc", |
| "html_parser_scheduler.h", |
| "html_preload_scanner.cc", |
| "html_preload_scanner.h", |
| "html_resource_preloader.cc", |
| "html_resource_preloader.h", |
| "html_source_tracker.cc", |
| "html_source_tracker.h", |
| "html_srcset_parser.cc", |
| "html_srcset_parser.h", |
| "html_stack_item.h", |
| "html_token.h", |
| "html_tokenizer.cc", |
| "html_tokenizer.h", |
| "html_tree_builder.cc", |
| "html_tree_builder.h", |
| "html_tree_builder_simulator.cc", |
| "html_tree_builder_simulator.h", |
| "html_view_source_parser.cc", |
| "html_view_source_parser.h", |
| "input_stream_preprocessor.h", |
| "markup_tokenizer_inlines.h", |
| "nesting_level_incrementer.h", |
| "parser_synchronization_policy.h", |
| "preload_request.cc", |
| "preload_request.h", |
| "resource_preloader.cc", |
| "resource_preloader.h", |
| "text_document_parser.cc", |
| "text_document_parser.h", |
| "text_resource_decoder.cc", |
| "text_resource_decoder.h", |
| "xss_auditor.cc", |
| "xss_auditor.h", |
| "xss_auditor_delegate.cc", |
| "xss_auditor_delegate.h", |
| ] |
| |
| # Optimizing the HTML parser for speed yields significant gains in performance |
| # in parser-heavy scenarios. See https://crbug.com/787512. |
| # Windows builds already override the default optimization in core.gni. |
| if (!is_debug && !is_win) { |
| configs -= [ "//build/config/compiler:default_optimization" ] |
| configs += [ "//build/config/compiler:optimize_max" ] |
| } |
| } |
| |
| fuzzer_test("blink_html_tokenizer_fuzzer") { |
| sources = [ |
| "html_tokenizer_fuzzer.cc", |
| ] |
| deps = [ |
| "../../:core", |
| "../../../platform:blink_fuzzer_test_support", |
| ] |
| } |