Commit a5949822 authored by Clovis PJ's avatar Clovis PJ Committed by Commit Bot

Adding Video Capture Host MojoLPM fuzzer.

Bug: 1113715
Change-Id: Ia927f27bba18eedf56447fa05afd3bddde679331
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2273128
Commit-Queue: Clovis PJ <clovispj@google.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarMax Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806672}
parent d3c810db
......@@ -254,3 +254,30 @@ fuzzer_test("indexed_db_leveldb_coding_decodeidbkeypath_fuzzer") {
seed_corpus =
"../../browser/indexed_db/fuzzer_corpus/encoded_indexed_db_key_path"
}
# Fuzzer only supports linux. As we use a `V4L2CaptureDevice`, which is only
# usable on linux through `VideoCaptureDeviceFactoryLinux`.
if (is_linux) {
mojolpm_fuzzer_test("video_capture_host_mojolpm_fuzzer") {
sources = [ "video_capture_host_mojolpm_fuzzer.cc" ]
proto_source = "video_capture_host_mojolpm_fuzzer.proto"
deps = [
"//base/test:test_support",
"//content/browser:for_content_tests",
"//content/public/browser:browser",
"//content/test:content_unittests",
"//content/test:test_support",
"//media:test_support",
"//media/capture:capture_lib",
"//media/capture:test_support",
"//services/network:test_support",
"//storage/browser:test_support",
"//third_party/blink/public/common:common",
"//third_party/icu:icudata",
]
proto_deps = [ "//media/capture/mojom:video_capture_mojolpm" ]
}
}
This diff is collapsed.
syntax = "proto2";
package content.fuzzing.video_capture_host.proto;
import "media/capture/mojom/video_capture.mojom.mojolpm.proto";
// Bind a new VideoCaptureHost remote
message NewVideoCaptureHostAction {
required uint32 id = 1;
required uint32 render_process_id = 2;
}
// A wrapper message for all remote actions. It requires further specifying
// the `render_process_id` and `device_index` to identify which session id to
// inject into the call. So the call correctly acts for a specific device.
message VideoCaptureHostDeviceRemoteAction {
required uint32 render_process_id = 1;
required uint32 device_index = 2;
required mojolpm.media.mojom.VideoCaptureHost.RemoteAction remote_action = 3;
}
// Run the specific sequence for (an indeterminate) period. This is not
// intended to create a specific ordering, but to allow the fuzzer to delay a
// later task until previous tasks have completed.
message RunThreadAction {
enum ThreadId {
IO = 0;
UI = 1;
}
required ThreadId id = 1;
}
// Actions that can be performed by the fuzzer.
message Action {
oneof action {
RunThreadAction run_thread = 1;
NewVideoCaptureHostAction new_video_capture_host = 2;
VideoCaptureHostDeviceRemoteAction video_capture_host_device_remote_action =
3;
mojolpm.media.mojom.VideoCaptureObserver.ReceiverAction
video_capture_observer_receiver_action = 4;
}
}
// Sequence provides a level of indirection which allows Testcase to compactly
// express repeated sequences of actions.
message Sequence {
repeated uint32 action_indexes = 1 [packed = true];
}
// Testcase is the top-level message type interpreted by the fuzzer.
message Testcase {
repeated Action actions = 1;
repeated Sequence sequences = 2;
repeated uint32 sequence_indexes = 3 [packed = true];
}
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