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

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

Issue 1865163002: Remove remoting messages from the IPC fuzzer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 | « no previous file | tools/ipc_fuzzer/message_lib/all_messages.h » ('j') | 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 ba59021231eaa9e41d60e2a808664abcc35b0183..1bb8ed06e635a90488097189cfd70f7c51fe0e62 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -1710,20 +1710,6 @@ struct FuzzTraits<printing::PdfRenderSettings> {
};
template <>
-struct FuzzTraits<remoting::ScreenResolution> {
- static bool Fuzz(remoting::ScreenResolution* p, Fuzzer* fuzzer) {
- webrtc::DesktopSize dimensions = p->dimensions();
- webrtc::DesktopVector dpi = p->dpi();
- if (!FuzzParam(&dimensions, fuzzer))
- return false;
- if (!FuzzParam(&dpi, fuzzer))
- return false;
- *p = remoting::ScreenResolution(dimensions, dpi);
- return true;
- }
-};
-
-template <>
struct FuzzTraits<SkBitmap> {
static bool Fuzz(SkBitmap* p, Fuzzer* fuzzer) {
// TODO(mbarbella): This should actually do something.
@@ -1888,73 +1874,6 @@ struct FuzzTraits<URLPattern> {
}
};
-template <>
-struct FuzzTraits<webrtc::DesktopSize> {
- static bool Fuzz(webrtc::DesktopSize* p, Fuzzer* fuzzer) {
- int32_t width = p->width();
- int32_t height = p->height();
- if (!FuzzParam(&width, fuzzer))
- return false;
- if (!FuzzParam(&height, fuzzer))
- return false;
- *p = webrtc::DesktopSize(width, height);
- return true;
- }
-};
-
-template <>
-struct FuzzTraits<webrtc::DesktopVector> {
- static bool Fuzz(webrtc::DesktopVector* p, Fuzzer* fuzzer) {
- int32_t x = p->x();
- int32_t y = p->y();
- if (!FuzzParam(&x, fuzzer))
- return false;
- if (!FuzzParam(&y, fuzzer))
- return false;
- p->set(x, y);
- return true;
- }
-};
-
-template <>
-struct FuzzTraits<webrtc::DesktopRect> {
- static bool Fuzz(webrtc::DesktopRect* p, Fuzzer* fuzzer) {
- int32_t left = p->left();
- int32_t top = p->top();
- int32_t right = p->right();
- int32_t bottom = p->bottom();
- if (!FuzzParam(&left, fuzzer))
- return false;
- if (!FuzzParam(&top, fuzzer))
- return false;
- if (!FuzzParam(&right, fuzzer))
- return false;
- if (!FuzzParam(&bottom, fuzzer))
- return false;
- *p = webrtc::DesktopRect::MakeLTRB(left, top, right, bottom);
- return true;
- }
-};
-
-template <>
-struct FuzzTraits<webrtc::MouseCursor> {
- static bool Fuzz(webrtc::MouseCursor* p, Fuzzer* fuzzer) {
- webrtc::DesktopVector hotspot = p->hotspot();
- if (!FuzzParam(&hotspot, fuzzer))
- return false;
- p->set_hotspot(hotspot);
-
- // TODO(mbarbella): Find a way to handle the size mutation properly.
- if (!fuzzer->ShouldGenerate())
- return false;
-
- // Using a small size here to avoid OOM or overflow on image allocation.
- webrtc::DesktopSize size(RandInRange(100), RandInRange(100));
- p->set_image(new webrtc::BasicDesktopFrame(size));
- return true;
- }
-};
-
// Redefine macros to generate generating from traits declarations.
// STRUCT declarations cause corresponding STRUCT_TRAITS declarations to occur.
#undef IPC_STRUCT_BEGIN
« no previous file with comments | « no previous file | tools/ipc_fuzzer/message_lib/all_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698