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

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

Issue 2048673002: Revert of Replace ui::LatencyInfo::InputCoordinate with gfx::PointF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index ad16379e475c200a4cb0a68338290378e8b89163..32b9bd5ddbce36afd029122ca223bc2178da18c5 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -1793,7 +1793,8 @@
bool terminated = p->terminated();
uint32_t input_coordinates_size = static_cast<uint32_t>(
RandInRange(ui::LatencyInfo::kMaxInputCoordinates + 1));
- gfx::PointF input_coordinates[ui::LatencyInfo::kMaxInputCoordinates];
+ ui::LatencyInfo::InputCoordinate
+ input_coordinates[ui::LatencyInfo::kMaxInputCoordinates];
if (!FuzzParamArray(
input_coordinates, input_coordinates_size, fuzzer))
return false;
@@ -1808,6 +1809,18 @@
}
*p = latency;
+ return true;
+ }
+};
+
+template <>
+struct FuzzTraits<ui::LatencyInfo::InputCoordinate> {
+ static bool Fuzz(
+ ui::LatencyInfo::InputCoordinate* p, Fuzzer* fuzzer) {
+ if (!FuzzParam(&p->x, fuzzer))
+ return false;
+ if (!FuzzParam(&p->y, fuzzer))
+ return false;
return true;
}
};
« no previous file with comments | « content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc ('k') | ui/events/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698