1// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Message format for the MojoLPM fuzzer for the PresentationService interface.
6
7syntax = "proto2";
8
9package content.fuzzing.presentation_service.proto;
10
11import "content/test/fuzzer/controller_presentation_service_delegate_for_fuzzing.proto";
12import "third_party/blink/public/mojom/presentation/presentation.mojom.mojolpm.proto";
13
14// Bind a new PresentationService remote
15message NewPresentationServiceAction {
16  required uint32 id = 1;
17}
18
19// Run the specific sequence for (an indeterminate) period. This is not
20// intended to create a specific ordering, but to allow the fuzzer to delay a
21// later task until previous tasks have completed.
22message RunThreadAction {
23  enum ThreadId {
24    IO = 0;
25    UI = 1;
26  }
27
28  required ThreadId id = 1;
29}
30
31// Actions that can be performed by the fuzzer.
32message Action {
33  oneof action {
34    RunThreadAction run_thread = 1;
35
36    NewPresentationServiceAction new_presentation_service = 2;
37    mojolpm.blink.mojom.PresentationService.RemoteAction
38        presentation_service_remote_action = 3;
39
40    mojolpm.blink.mojom.PresentationController.ReceiverAction
41        presentation_controller_receiver_action = 4;
42    mojolpm.blink.mojom.PresentationReceiver.ReceiverAction
43        presentation_receiver_receiver_action = 5;
44
45    content.fuzzing.controller_presentation_service_delegate_for_fuzzing.proto
46        .Action controller_delegate_action = 6;
47  }
48}
49
50// Sequence provides a level of indirection which allows Testcase to compactly
51// express repeated sequences of actions.
52message Sequence {
53  repeated uint32 action_indexes = 1 [packed = true];
54}
55
56// Testcase is the top-level message type interpreted by the fuzzer.
57message Testcase {
58  repeated Action actions = 1;
59  repeated Sequence sequences = 2;
60  repeated uint32 sequence_indexes = 3 [packed = true];
61}
62