Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html |
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html |
| index 5c27141076f38e88a90b75e06455859ffedbd147..7e2548790b061ea6025929042bffa7aa30ed9b3c 100644 |
| --- a/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html |
| +++ b/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html |
| @@ -5,6 +5,8 @@ |
| <script> |
| 'use strict'; |
| promise_test(() => { |
| + let length = 1; |
| + let characteristic; |
| return setBluetoothFakeAdapter('HeartRateAdapter') |
| .then(() => requestDeviceWithKeyDown({ |
| filters: [{services: ['heart_rate']}], |
| @@ -12,9 +14,9 @@ promise_test(() => { |
| .then(device => device.gatt.connect()) |
| .then(gattServer => gattServer.getPrimaryService('generic_access')) |
| .then(service => service.getCharacteristic('gap.device_name')) |
| - .then(characteristic => Promise.all([ |
| - characteristic.writeValue(new Uint8Array(1 /* length */)), |
| - characteristic.writeValue(new ArrayBuffer(1 /* length */)), |
| - characteristic.writeValue(new DataView(new ArrayBuffer(1 /* length */)))])); |
| + .then(c => characteristic = c) |
| + .then(() => characteristic.writeValue(new Uint8Array(length))) |
| + .then(() => characteristic.writeValue(new ArrayBuffer(length))) |
| + .then(() => characteristic.writeValue(new DataView(new ArrayBuffer(length)))) |
|
ortuno
2017/01/30 23:28:52
nit: you are missing a semicolon.
|
| }, 'A regular write request to a writable characteristic should succeed.'); |
| </script> |