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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/constraints_unittest.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/constraints_unittest.py
diff --git a/third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/constraints_unittest.py b/third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/constraints_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce450152ad9719ead8b425fdb898414d1e1393da
--- /dev/null
+++ b/third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/constraints_unittest.py
@@ -0,0 +1,16 @@
+# 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.
+
+import unittest
+
+import constraints
+
+
+class WebBluetoothConstraintsTest(unittest.TestCase):
+
+ def testGetRandomValidUUIDString(self):
+ # Regex from: https://webbluetoothcg.github.io/web-bluetooth/#uuids
+ self.assertRegexpMatches(
+ constraints.GetValidUUIDString(),
+ '^\'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\'$')

Powered by Google App Engine
This is Rietveld 408576698