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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/parameter_fuzzer.py

Issue 2166463002: bluetooth: Basic Web Bluetooth Fuzzer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Move to testing/clusterfuzz directory Created 4 years, 5 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: third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/parameter_fuzzer.py
diff --git a/third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/parameter_fuzzer.py b/third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/parameter_fuzzer.py
new file mode 100644
index 0000000000000000000000000000000000000000..baa00b0e3c347821e82a040d282d518dc1a0bc5f
--- /dev/null
+++ b/third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/parameter_fuzzer.py
@@ -0,0 +1,29 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Module to fuzz parameters of a template."""
+
+import constraints
+from fuzzer_helpers import FillInParameter
+
+
+def FuzzParameters(test_file_data):
+ """Fuzzes the data in the string provided.
+
+ For now this function only replaces the TRANSFORM_SERVICE_UUID parameter
+ with a valid UUID string.
+
+ Args:
+ test_file_data: String that contains parameters to be replaced.
+
+ Returns:
+ A string containing the value of test_file_data but with all its
+ parameters replaced.
+ """
+
+ test_file_data = FillInParameter('TRANSFORM_REQUEST_DEVICE_OPTIONS',
+ constraints.GetRequestDeviceOptions,
+ test_file_data)
+
+ return test_file_data

Powered by Google App Engine
This is Rietveld 408576698