Avi Drissman | 6459548 | 2022-09-14 20:52:29 | [diff] [blame^] | 1 | // Copyright 2020 The Chromium Authors |
Daniel McArdle | 72692a1 | 2020-05-11 16:47:16 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | syntax = "proto2"; |
| 6 | |
| 7 | package fuzz_proto; |
| 8 | |
| 9 | import "testing/libfuzzer/proto/json.proto"; |
| 10 | |
| 11 | message FuzzerInput { |
Daniel McArdle | bbfc145 | 2020-05-18 15:11:55 | [diff] [blame] | 12 | // Using int64 to match internal representation of base::Time and |
| 13 | // base::TimeTicks. |
Daniel McArdle | 72692a1 | 2020-05-11 16:47:16 | [diff] [blame] | 14 | required int64 parse_time = 1; |
| 15 | required int64 serialize_time = 2; |
Daniel McArdle | bbfc145 | 2020-05-18 15:11:55 | [diff] [blame] | 16 | required int64 now_ticks = 5; |
Daniel McArdle | 72692a1 | 2020-05-11 16:47:16 | [diff] [blame] | 17 | required BackoffEntryPolicy policy = 3; |
| 18 | required json_proto.ArrayValue serialized_entry = 4; |
| 19 | } |
| 20 | |
| 21 | // Input for the fuzzer to try serializing a BackoffEntry. |
| 22 | // Keep aligned with |net::BackoffEntry::Policy|. |
| 23 | message BackoffEntryPolicy { |
| 24 | required int64 num_errors_to_ignore = 1; |
| 25 | required int64 initial_delay_ms = 2; |
| 26 | required double multiply_factor = 3; |
| 27 | required double jitter_factor = 4; |
| 28 | required int64 maximum_backoff_ms = 5; |
| 29 | required int64 entry_lifetime_ms = 6; |
| 30 | required bool always_use_initial_delay = 7; |
| 31 | } |