| 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
|
| index 5f5e121b9429a89fb172dc4c4c7ef19f539f6e68..f17621a781d420d414c5546ea550b34ea2d09a2b 100644
|
| --- a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
|
| @@ -4,20 +4,22 @@
|
| <script src="../../resources/bluetooth/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.');
|
| +promise_test(() => {
|
| + return setBluetoothFakeAdapter('FailingGATTOperationsAdapter')
|
| + .then(() => requestDeviceWithKeyDown({
|
| + filters: [{services: [errorUUID(0xA0)]}]}))
|
| + .then(device => device.gatt.connect())
|
| + .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0)))
|
| + .then(service => {
|
| + let tests = Promise.resolve();
|
| + gatt_errors_tests.forEach(testSpec => {
|
| + tests = tests.then(() => service.getCharacteristic(testSpec.uuid))
|
| + .then(characteristic => assert_promise_rejects_with_message(
|
| + characteristic.writeValue(new Uint8Array([1])),
|
| + testSpec.error,
|
| + testSpec.testName));
|
| });
|
| - }, testSpec.testName);
|
| + return tests;
|
| + });
|
| });
|
| </script>
|
|
|