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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/blocklisted-descriptors-not-present.html

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Implement WebBluetooth getDescriptor[s] Created 3 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
5 <script>
6 'use strict';
7 promise_test(() => {
8 // DisconnectingHealthThermometerAdapter's measurement_interval contains
9 // one blocklisted descriptor. Make sure that it isn't returned in the result
10 // of getDescriptors().
11 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter')
12 .then(() => requestDeviceWithKeyDown({
13 filters: [{services: ['health_thermometer']}]}))
14 .then(device => device.gatt.connect())
15 .then(gattServer => gattServer.getPrimaryService('health_thermometer'))
16 .then(service => service.getCharacteristic('measurement_interval'))
17 .then(characteristic => characteristic.getDescriptors())
18 .then(descriptors => {
19 descriptors.forEach(descriptor => {
20 let bad_uuid = blocklist_test_descriptor_uuid;
21 // bad_uuid is a blocklisted UUID. It should never be present
22 // in a getDescriptors() result.
23 assert_true(descriptor.uuid != bad_uuid)
24 });
25 })
26 }, 'Making sure no blocklisted descriptors are present. ');
27
28
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698