| Index: third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
|
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..068cf034f38c128419e5d4f8adb9d3e428af33a8
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
|
| @@ -0,0 +1,23 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../resources/bluetooth-helpers.js"></script>
|
| +<script>
|
| +'use strict';
|
| +gatt_errors_tests.forEach(testSpec => {
|
| + promise_test(() => {
|
| + return setBluetoothFakeAdapter('FailingGATTOperationsAdapter')
|
| + .then(() => requestDeviceWithKeyDown({
|
| + filters: [{services: [errorUUID(0xA0)]}]}))
|
| + .then(device => device.gatt.connect())
|
| + .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0)))
|
| + .then(service => service.getCharacteristic(testSpec.uuid))
|
| + .then(characteristic => {
|
| + return assert_promise_rejects_with_message(
|
| + characteristic.writeValue(new Uint8Array([1])),
|
| + testSpec.error,
|
| + 'Trying to write to a characteristic failed.');
|
| + });
|
| + }, testSpec.testName);
|
| +});
|
| +</script>
|
|
|