Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 2522843002: Convert Gamepad IPC messages into mojo interface. (Closed)
Patch Set: code rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/gamepad/public/interfaces/gamepad.mojom ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 04810dcee1768a491588cdf5b29d63af667484c7..e031993c8e5ecac39f9a33359476526cbd4bf9b8 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -634,44 +634,6 @@ struct FuzzTraits<base::DictionaryValue> {
};
template <>
-struct FuzzTraits<blink::WebGamepad> {
- static bool Fuzz(blink::WebGamepad* p, Fuzzer* fuzzer) {
- if (!FuzzParam(&p->connected, fuzzer))
- return false;
- if (!FuzzParam(&p->timestamp, fuzzer))
- return false;
- unsigned idLength = static_cast<unsigned>(
- RandInRange(blink::WebGamepad::idLengthCap + 1));
- if (!FuzzParamArray(&p->id[0], idLength, fuzzer))
- return false;
- p->axesLength = static_cast<unsigned>(
- RandInRange(blink::WebGamepad::axesLengthCap + 1));
- if (!FuzzParamArray(&p->axes[0], p->axesLength, fuzzer))
- return false;
- p->buttonsLength = static_cast<unsigned>(
- RandInRange(blink::WebGamepad::buttonsLengthCap + 1));
- if (!FuzzParamArray(&p->buttons[0], p->buttonsLength, fuzzer))
- return false;
- unsigned mappingsLength = static_cast<unsigned>(
- RandInRange(blink::WebGamepad::mappingLengthCap + 1));
- if (!FuzzParamArray(&p->mapping[0], mappingsLength, fuzzer))
- return false;
- return true;
- }
-};
-
-template <>
-struct FuzzTraits<blink::WebGamepadButton> {
- static bool Fuzz(blink::WebGamepadButton* p, Fuzzer* fuzzer) {
- if (!FuzzParam(&p->pressed, fuzzer))
- return false;
- if (!FuzzParam(&p->value, fuzzer))
- return false;
- return true;
- }
-};
-
-template <>
struct FuzzTraits<cc::CompositorFrame> {
static bool Fuzz(cc::CompositorFrame* p, Fuzzer* fuzzer) {
// TODO(mbarbella): Support mutation.
« no previous file with comments | « device/gamepad/public/interfaces/gamepad.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698