Index: third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptor/descriptor-not-found.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptor/descriptor-not-found.html b/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptor/descriptor-not-found.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e78b249f76be28e6134564cee27bdc107cdedaae |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptor/descriptor-not-found.html |
@@ -0,0 +1,23 @@ |
+<!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(() => { |
+ 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 => { |
+ assert_promise_rejects_with_message( |
+ // Valid Range is not present in this characteristic |
+ characteristic.getDescriptor(2906), |
+ new DOMException( |
+ 'No Descriptors with specified UUID found in Characteristic.', |
+ 'NotFoundError')); |
+ }) |
+}, 'Request for absent descriptor. Reject with NotFoundError.'); |
+</script> |