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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/wbt_fakes.py

Issue 2178853006: bluetooth: fuzzer: Add a connect and getPrimaryServices tokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-fuzzer-fake-adapter-uuid
Patch Set: Format Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/test_case_fuzzer.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Module that contains information about Web Bluetooth's Fake Adapters."""
6
7 BLACKLISTED_UUID = '611c954a-263b-4f4a-aab6-01ddb953f985'
8 DISCONNECTION_UUID = '01d7d889-7451-419f-aeb8-d65e7b9277af'
9 GATT_ERROR_UUID = '000000a0-97e5-4cd7-b9f1-f5a427670c59'
10
11 CONNECTION_ERROR_UUIDS = [
12 '00000000-97e5-4cd7-b9f1-f5a427670c59',
13 '00000001-97e5-4cd7-b9f1-f5a427670c59',
14 '00000002-97e5-4cd7-b9f1-f5a427670c59',
15 '00000003-97e5-4cd7-b9f1-f5a427670c59',
16 '00000004-97e5-4cd7-b9f1-f5a427670c59',
17 '00000005-97e5-4cd7-b9f1-f5a427670c59',
18 '00000006-97e5-4cd7-b9f1-f5a427670c59',
19 '00000007-97e5-4cd7-b9f1-f5a427670c59',
20 '00000008-97e5-4cd7-b9f1-f5a427670c59',
21 '00000009-97e5-4cd7-b9f1-f5a427670c59',
22 '0000000a-97e5-4cd7-b9f1-f5a427670c59',
23 '0000000b-97e5-4cd7-b9f1-f5a427670c59',
24 '0000000c-97e5-4cd7-b9f1-f5a427670c59',
25 '0000000d-97e5-4cd7-b9f1-f5a427670c59',
26 '0000000e-97e5-4cd7-b9f1-f5a427670c59',
27 ]
28
29 # List of services that are included in our fake adapters.
30 ADVERTISED_SERVICES = [
31 'generic_access',
32 'glucose',
33 'tx_power',
34 'heart_rate',
35 'human_interface_device',
36 'device_information',
37 BLACKLISTED_UUID,
38 CONNECTION_ERROR_UUIDS[0],
39 DISCONNECTION_UUID,
40 GATT_ERROR_UUID,
41 ]
42
43 # List of available fake adapters.
44 ALL_ADAPTERS = [
45 'NotPresentAdapter',
46 'NotPoweredAdapter',
47 'EmptyAdapter',
48 'FailStartDiscoveryAdapter',
49 'GlucoseHeartRateAdapter',
50 'UnicodeDeviceAdapter',
51 'MissingServiceHeartRateAdapter',
52 'MissingCharacteristicHeartRateAdapter',
53 'HeartRateAdapter',
54 'TwoHeartRateServicesAdapter',
55 'DisconnectingHeartRateAdapter',
56 'BlacklistTestAdapter',
57 'FailingConnectionsAdapter',
58 'FailingGATTOperationsAdapter',
59 'DelayedServicesDiscoveryAdapter',
60 ]
61
62 # List of fake adapters that include devices.
63 ADAPTERS_WITH_DEVICES = [
64 (
65 'GlucoseHeartRateAdapter',
66 ['generic_access', 'heart_rate', 'glucose', 'tx_power'],
67 ),
68 (
69 'MissingServiceHeartRateAdapter',
70 ['generic_access', 'heart_rate'],
71 ),
72 (
73 'MissingCharacteristicHeartRateAdapter',
74 ['generic_access', 'heart_rate'],
75 ),
76 (
77 'HeartRateAdapter',
78 ['generic_access', 'heart_rate'],
79 ),
80 (
81 'TwoHeartRateServicesAdapter',
82 ['generic_access', 'heart_rate'],
83 ),
84 (
85 'DisconnectingHeartRateAdapter',
86 ['generic_access', 'heart_rate'],
87 ),
88 (
89 'BlacklistTestAdapter',
90 [BLACKLISTED_UUID, 'device_information', 'generic_access',
91 'heart_rate', 'human_interface_device'],
92 ),
93 (
94 'FailingConnectionsAdapter',
95 CONNECTION_ERROR_UUIDS,
96 ),
97 (
98 'FailingGATTOperationsAdapter',
99 [GATT_ERROR_UUID],
100 ),
101 (
102 'DelayedServicesDiscoveryAdapter',
103 ['generic_access', 'heart_rate'],
104 ),
105 ]
106
107 # List of fake adapters with services.
108 ADAPTERS_WITH_SERVICES = [
109 (
110 'MissingCharacteristicHeartRateAdapter',
111 ['generic_access', 'heart_rate'],
112 ),
113 (
114 'HeartRateAdapter',
115 ['generic_access', 'heart_rate'],
116 ),
117 (
118 'TwoHeartRateServicesAdapter',
119 ['generic_access', 'heart_rate'],
120 ),
121 (
122 'DisconnectingHeartRateAdapter',
123 ['generic_access', 'heart_rate', DISCONNECTION_UUID],
124 ),
125 (
126 'BlacklistTestAdapter',
127 [BLACKLISTED_UUID, 'device_information', 'generic_access',
128 'heart_rate', 'human_interface_device'],
129 ),
130 (
131 'FailingGATTOperationsAdapter',
132 [GATT_ERROR_UUID],
133 ),
134 (
135 'DelayedServicesDiscoveryAdapter',
136 ['heart_rate']
137 ),
138 ]
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/testing/clusterfuzz/test_case_fuzzer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698