Index: third_party/WebKit/LayoutTests/bluetooth/readValue.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/readValue.html b/third_party/WebKit/LayoutTests/bluetooth/readValue.html |
index 343f978682b021ae12c02d077f3961e74a3431b3..a5b0e53ed0083169454e3cd35c4cab8de4577535 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/readValue.html |
+++ b/third_party/WebKit/LayoutTests/bluetooth/readValue.html |
@@ -86,4 +86,20 @@ promise_test(() => { |
assert_equals(value_str, 'Heart Rate Device'); |
}); |
}, 'Request for characteristic. Should return right characteristic'); |
+ |
+promise_test(() => { |
+ testRunner.setBluetoothMockDataSet('HeartRateAdapter'); |
+ return requestDeviceWithKeyDown({filters: [{services: ['heart_rate']}]}) |
+ .then(device => device.connectGATT()) |
+ .then(gattServer => gattServer.getPrimaryService('generic_access')) |
+ .then(service => service.getCharacteristic('gap.device_name')) |
+ .then(characteristic => { |
+ assert_equals(characteristic.value, null); |
+ return characteristic.readValue().then(() => { |
+ let decoder = new TextDecoder('utf-8'); |
+ let value_str = decoder.decode(characteristic.value); |
+ assert_equals(value_str, 'Heart Rate Device'); |
+ }) |
+ }); |
+}, 'Request for characteristic. Should update characteristic.value'); |
</script> |