Index: third_party/WebKit/LayoutTests/bluetooth/writeValue.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/writeValue.html b/third_party/WebKit/LayoutTests/bluetooth/writeValue.html |
index 881cf22d62f2c39f9ec63fc17988ae0183d6bd49..992784d78dffb8186895d01fa205dad04982bde6 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/writeValue.html |
+++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue.html |
@@ -98,4 +98,20 @@ promise_test(() => { |
characteristic.writeValue(new ArrayBuffer(1 /* length */)), |
characteristic.writeValue(new DataView(new ArrayBuffer(1 /* length */)))])); |
}, 'A regular write request to a writable characteristic should succeed.'); |
+ |
+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); |
+ let textEncoder = new TextEncoder(); |
+ let newValue = textEncoder.encode('foo'); |
+ return characteristic.writeValue(newValue).then(() => { |
+ assert_array_equals(characteristic.value.buffer, newValue.buffer); |
+ }); |
+ }); |
+}, 'A regular write request to a writable characteristic should update value.'); |
</script> |