File: page_load_in_process_fuzzer.proto

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (71 lines) | stat: -rw-r--r-- 2,691 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";
package test.fuzzing.page_load_fuzzing;

// A fuzzer case for page_load_in_process_fuzzer.cc.
message FuzzCase {
  // Any network (HTTP, HTTPS) resources that should be available
  repeated NetworkResource network_resource = 1;
  // Where to navigate the browser initially
  // If present, we navigate to a data URI with a particular content.
  // Otherwise we navigate to the first network resource.
  optional DataUriNavigation data_uri_navigation = 2;
  // Body of the response.
  string body = 3;
}

// Additional information if we're loading the resource over the network.
message NetworkResource {
  // Which server will this resource be made available on.
  // Typically, use HTTPS_ORIGIN1, but if you need to test a cross-origin
  // case you can make resources available on other servers.
  WhichServer which_server = 1;
  // The path to request on the http(s) server. Should start with /
  string path = 2;
  // The HTTP status which will be presented in the response, e.g. 200
  uint32 http_status = 3;
  // Custom headers in the HTTP response.
  repeated CustomHeader custom_headers = 4;
  // The Content-Type to be returned.
  string content_type = 5;
  // The textual reason string to go along with the HTTP status code,
  // for example, "OK"
  string reason = 6;
  // The body of the response.
  // The strings $HTTPS_ORIGIN1, $HTTPS_ORIGIN2, $HTTP_ORIGIN1 and $HTTP_ORIGIN2
  // will be substituted with the root URIs for the test servers.
  // For example, "<html><img src=\"$HTTPS_ORIGIN1/test.png\"></html>"
  // should load a page from one of the network_resources provided in
  // the FuzzCase. Four servers are provided to test cross-origin cases.
  optional string body = 7;
}

// Which server should this network resource be made available on.
enum WhichServer {
  HTTPS_ORIGIN1 = 0;
  HTTPS_ORIGIN2 = 1;
  HTTP_ORIGIN1 = 2;
  HTTP_ORIGIN2 = 3;
}

// A custom header in an HTTP response.
message CustomHeader {
  string key = 1;
  string value = 2;
}

// A navigation to a data: URI
message DataUriNavigation {
  // The content-type of the data URI
  string content_type = 1;
  // The body, which will be base64 encoded.
  // The strings $HTTPS_ORIGIN1, $HTTPS_ORIGIN2, $HTTP_ORIGIN1 and $HTTP_ORIGIN2
  // will be substituted with the root URIs for the test servers.
  // For example, "<html><img src=\"$HTTPS_ORIGIN1/test.png\"></html>"
  // should load a page from one of the network_resources provided in
  // the FuzzCase. Four servers are provided to test cross-origin cases.
  string body = 2;
}