Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/write-succeeds.html |
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/write-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/write-succeeds.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0b1eb3b8bfe698aa9eca78a26bf69fd035f1dfa8 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/write-succeeds.html |
| @@ -0,0 +1,20 @@ |
| +<!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 => characteristic.getDescriptor(user_description.name)) |
| + .then(descriptor =>Promise.all([ |
| + descriptor.writeValue(new Uint8Array(1 /* length */)), |
| + descriptor.writeValue(new ArrayBuffer(1 /* length */)), |
| + descriptor.writeValue(new DataView(new ArrayBuffer(1 /* length */)))])); |
|
ortuno
2017/01/28 00:22:51
This would fail in actual devices because there ca
dougt
2017/01/31 00:31:25
Done. Also addressed the test cases in characteri
|
| + }, 'A regular write request to a writable descriptor should succeed.'); |
| +</script> |