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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/blocklisted-descriptors-not-present.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/blocklisted-descriptors-not-present.html b/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/blocklisted-descriptors-not-present.html
new file mode 100644
index 0000000000000000000000000000000000000000..db5ce351b45cc438cf47cf8cf9d609a90d23587d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/blocklisted-descriptors-not-present.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+ // DisconnectingHealthThermometerAdapter's measurement_interval contains
+ // one blocklisted descriptor. Make sure that it isn't returned in the result
+ // of getDescriptors().
+ return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter')
+ .then(() => requestDeviceWithKeyDown({
+ filters: [{services: ['health_thermometer']}]}))
+ .then(device => device.gatt.connect())
+ .then(gattServer => gattServer.getPrimaryService('health_thermometer'))
+ .then(service => service.getCharacteristic('measurement_interval'))
+ .then(characteristic => characteristic.getDescriptors())
+ .then(descriptors => {
+ descriptors.forEach(descriptor => {
+ let bad_uuid = blocklist_test_descriptor_uuid;
+ // bad_uuid is a blocklisted UUID. It should never be present
+ // in a getDescriptors() result.
+ assert_true(descriptor.uuid != bad_uuid)
+ });
+ })
+}, 'Making sure no blocklisted descriptors are present. ');
+
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698