OLD | NEW |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 // Bluetooth UUID constants: | 3 // Bluetooth UUID constants: |
4 // Services: | 4 // Services: |
5 var blocklist_test_service_uuid = "611c954a-263b-4f4a-aab6-01ddb953f985"; | 5 var blocklist_test_service_uuid = "611c954a-263b-4f4a-aab6-01ddb953f985"; |
6 var request_disconnection_service_uuid = "01d7d889-7451-419f-aeb8-d65e7b9277af"; | 6 var request_disconnection_service_uuid = "01d7d889-7451-419f-aeb8-d65e7b9277af"; |
7 // Characteristics: | 7 // Characteristics: |
8 var blocklist_exclude_reads_characteristic_uuid = | 8 var blocklist_exclude_reads_characteristic_uuid = |
9 "bad1c9a2-9a5b-4015-8b60-1579bbbf2135"; | 9 "bad1c9a2-9a5b-4015-8b60-1579bbbf2135"; |
10 var request_disconnection_characteristic_uuid = | 10 var request_disconnection_characteristic_uuid = |
11 "01d7d88a-7451-419f-aeb8-d65e7b9277af"; | 11 "01d7d88a-7451-419f-aeb8-d65e7b9277af"; |
| 12 // Descriptors: |
| 13 var blocklist_test_descriptor_uuid = "bad2ddcf-60db-45cd-bef9-fd72b153cf7c"; |
12 | 14 |
13 // Sometimes we need to test that using either the name, alias, or UUID | 15 // Sometimes we need to test that using either the name, alias, or UUID |
14 // produces the same result. The following objects help us do that. | 16 // produces the same result. The following objects help us do that. |
15 var generic_access = { | 17 var generic_access = { |
16 alias: 0x1800, | 18 alias: 0x1800, |
17 name: 'generic_access', | 19 name: 'generic_access', |
18 uuid: '00001800-0000-1000-8000-00805f9b34fb' | 20 uuid: '00001800-0000-1000-8000-00805f9b34fb' |
19 }; | 21 }; |
20 var device_name = { | 22 var device_name = { |
21 alias: 0x2a00, | 23 alias: 0x2a00, |
(...skipping 23 matching lines...) Expand all Loading... |
45 var battery_service = { | 47 var battery_service = { |
46 alias: 0x180f, | 48 alias: 0x180f, |
47 name: 'battery_service', | 49 name: 'battery_service', |
48 uuid: '0000180f-0000-1000-8000-00805f9b34fb' | 50 uuid: '0000180f-0000-1000-8000-00805f9b34fb' |
49 }; | 51 }; |
50 var battery_level = { | 52 var battery_level = { |
51 alias: 0x2A19, | 53 alias: 0x2A19, |
52 name: 'battery_level', | 54 name: 'battery_level', |
53 uuid: '00002a19-0000-1000-8000-00805f9b34fb' | 55 uuid: '00002a19-0000-1000-8000-00805f9b34fb' |
54 }; | 56 }; |
| 57 var user_description = { |
| 58 alias: 0x2901, |
| 59 name: 'gatt.characteristic_user_description', |
| 60 uuid: '00002901-0000-1000-8000-00805f9b34fb' |
| 61 }; |
| 62 var client_characteristic_configuration = { |
| 63 alias: 0x2902, |
| 64 name: 'gatt.client_characteristic_configuration', |
| 65 uuid: '00002902-0000-1000-8000-00805f9b34fb' |
| 66 }; |
55 | 67 |
56 // The following tests make sure the Web Bluetooth implementation | 68 // The following tests make sure the Web Bluetooth implementation |
57 // responds correctly to the different types of errors the | 69 // responds correctly to the different types of errors the |
58 // underlying platform might return for GATT operations. | 70 // underlying platform might return for GATT operations. |
59 | 71 |
60 // Each browser should map these characteristics to specific code paths | 72 // Each browser should map these characteristics to specific code paths |
61 // that result in different errors thus increasing code coverage | 73 // that result in different errors thus increasing code coverage |
62 // when testing. Therefore some of these characteristics might not be useful | 74 // when testing. Therefore some of these characteristics might not be useful |
63 // for all browsers. | 75 // for all browsers. |
64 // | 76 // |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 filters: [{ services: services, name: 'Name' }], | 367 filters: [{ services: services, name: 'Name' }], |
356 optionalServices: ['heart_rate'] | 368 optionalServices: ['heart_rate'] |
357 }, { | 369 }, { |
358 filters: [{ services: services, namePrefix: 'Pre' }], | 370 filters: [{ services: services, namePrefix: 'Pre' }], |
359 optionalServices: ['heart_rate'] | 371 optionalServices: ['heart_rate'] |
360 }, { | 372 }, { |
361 filters: [{ services: services, name: 'Name', namePrefix: 'Pre' }], | 373 filters: [{ services: services, name: 'Name', namePrefix: 'Pre' }], |
362 optionalServices: ['heart_rate'] | 374 optionalServices: ['heart_rate'] |
363 }]; | 375 }]; |
364 } | 376 } |
OLD | NEW |