| Index: third_party/WebKit/LayoutTests/bluetooth/writeValue.html
|
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/writeValue.html b/third_party/WebKit/LayoutTests/bluetooth/writeValue.html
|
| index eb0bdf88293075e22886aa55e3459bb71f5b872e..3e4744fe3d3b7db64be886d30af2a5a3e71ab1ea 100644
|
| --- a/third_party/WebKit/LayoutTests/bluetooth/writeValue.html
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue.html
|
| @@ -16,12 +16,12 @@ promise_test(() => {
|
| .then(gattServer => gattServer.getPrimaryService('generic_access'))
|
| .then(service => service.getCharacteristic('gap.device_name'))
|
| .then(characteristic => {
|
| - testRunner.setBluetoothMockDataSet('EmptyAdapter');
|
| - return assert_promise_rejects_with_message(
|
| - characteristic.writeValue(new ArrayBuffer(1 /* length */)),
|
| - new DOMException(
|
| - 'Bluetooth Device is no longer in range.', 'NetworkError'),
|
| - 'Device went out of range.');
|
| + return setBluetoothFakeAdapter('EmptyAdapter')
|
| + .then(() => assert_promise_rejects_with_message(
|
| + characteristic.writeValue(new ArrayBuffer(1 /* length */)),
|
| + new DOMException(
|
| + 'Bluetooth Device is no longer in range.', 'NetworkError'),
|
| + 'Device went out of range.'));
|
| });
|
| }, 'Device goes out of range. Reject with NetworkError.');
|
|
|
| @@ -33,12 +33,12 @@ promise_test(() => {
|
| .then(gattServer => gattServer.getPrimaryService('generic_access'))
|
| .then(service => service.getCharacteristic('gap.device_name'))
|
| .then(characteristic => {
|
| - testRunner.setBluetoothMockDataSet('MissingServiceHeartRateAdapter');
|
| - return assert_promise_rejects_with_message(
|
| - characteristic.writeValue(new ArrayBuffer(1 /* length */)),
|
| - new DOMException('GATT Service no longer exists.',
|
| - 'InvalidStateError'),
|
| - 'Service got removed.');
|
| + return setBluetoothFakeAdapter('MissingServiceHeartRateAdapter')
|
| + .then(() => assert_promise_rejects_with_message(
|
| + characteristic.writeValue(new ArrayBuffer(1 /* length */)),
|
| + new DOMException('GATT Service no longer exists.',
|
| + 'InvalidStateError'),
|
| + 'Service got removed.'));
|
| });
|
| }, 'Service gets removed. Reject with InvalidStateError.');
|
|
|
| @@ -50,12 +50,12 @@ promise_test(() => {
|
| .then(gattServer => gattServer.getPrimaryService('generic_access'))
|
| .then(service => service.getCharacteristic('gap.device_name'))
|
| .then(characteristic => {
|
| - testRunner.setBluetoothMockDataSet('MissingCharacteristicHeartRateAdapter');
|
| - return assert_promise_rejects_with_message(
|
| - characteristic.writeValue(new ArrayBuffer(1 /* length */)),
|
| - new DOMException(
|
| - 'GATT Characteristic no longer exists.', 'InvalidStateError'),
|
| - 'Characteristic got removed.');
|
| + return setBluetoothFakeAdapter('MissingCharacteristicHeartRateAdapter')
|
| + .then(() => assert_promise_rejects_with_message(
|
| + characteristic.writeValue(new ArrayBuffer(1 /* length */)),
|
| + new DOMException(
|
| + 'GATT Characteristic no longer exists.', 'InvalidStateError'),
|
| + 'Characteristic got removed.'));
|
| });
|
| }, 'Characteristic gets removed. Reject with InvalidStateError.');
|
|
|
|
|