| Index: third_party/WebKit/LayoutTests/bluetooth/readValue/gen-gatt-op-device-disconnects-before.html
|
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/getCharacteristic/device-disconnects-before.html b/third_party/WebKit/LayoutTests/bluetooth/readValue/gen-gatt-op-device-disconnects-before.html
|
| similarity index 57%
|
| copy from third_party/WebKit/LayoutTests/bluetooth/getCharacteristic/device-disconnects-before.html
|
| copy to third_party/WebKit/LayoutTests/bluetooth/readValue/gen-gatt-op-device-disconnects-before.html
|
| index a80a11375f4abb2d7351e76d6013a053e1ff58d7..d5fa7159e444686aaf09587a920a64f28d253c2c 100644
|
| --- a/third_party/WebKit/LayoutTests/bluetooth/getCharacteristic/device-disconnects-before.html
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/readValue/gen-gatt-op-device-disconnects-before.html
|
| @@ -1,3 +1,4 @@
|
| +<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
|
| <!DOCTYPE html>
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| @@ -5,16 +6,18 @@
|
| <script>
|
| 'use strict';
|
| promise_test(() => {
|
| - return setBluetoothFakeAdapter('DisconnectingHeartRateAdapter')
|
| + let val = new Uint8Array([1]);
|
| + return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter')
|
| .then(() => requestDeviceWithKeyDown({
|
| - filters: [{services: ['heart_rate']}],
|
| + filters: [{services: ['health_thermometer']}],
|
| optionalServices: [request_disconnection_service_uuid]
|
| }))
|
| .then(device => device.gatt.connect())
|
| .then(gattServer => {
|
| - let heart_rate_service;
|
| - return gattServer.getPrimaryService('heart_rate')
|
| - .then(hrs => heart_rate_service = hrs)
|
| + let measurement_interval;
|
| + return gattServer.getPrimaryService('health_thermometer')
|
| + .then(ht=> ht.getCharacteristic('measurement_interval'))
|
| + .then(mi => measurement_interval = mi)
|
| .then(() => gattServer.getPrimaryService(
|
| request_disconnection_service_uuid))
|
| .then(service => service.getCharacteristic(
|
| @@ -22,10 +25,11 @@ promise_test(() => {
|
| .then(requestDisconnection => requestDisconnection.writeValue(
|
| new Uint8Array([0])))
|
| .then(() => assert_promise_rejects_with_message(
|
| - heart_rate_service.getCharacteristic('heart_rate_measurement'),
|
| + measurement_interval.readValue(),
|
| new DOMException(
|
| - 'GATT Server is disconnected. Cannot retrieve characteristics.',
|
| + 'GATT Server is disconnected. Cannot perform GATT operations.',
|
| 'NetworkError')));
|
| });
|
| -}, 'Device disconnects before getCharacteristic. Reject with NetworkError');
|
| +}, 'Device disconnects before readValue. Reject with NetworkError.');
|
| +
|
| </script>
|
|
|