Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnected-device.html |
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/connect/connection-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnected-device.html |
| similarity index 56% |
| copy from third_party/WebKit/LayoutTests/bluetooth/connect/connection-succeeds.html |
| copy to third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnected-device.html |
| index 97321810f6448a46bc4df13cc53d2c90b0ca6940..7497a2e976c53fe58f80954381a3a3e52c64cae4 100644 |
| --- a/third_party/WebKit/LayoutTests/bluetooth/connect/connection-succeeds.html |
| +++ b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnected-device.html |
| @@ -8,7 +8,9 @@ promise_test(() => { |
| return setBluetoothFakeAdapter('HeartRateAdapter') |
| .then(() => requestDeviceWithKeyDown({ |
| filters: [{services: ['heart_rate']}]})) |
| - .then(device => device.gatt.connect()) |
| - .then(gattServer => assert_true(gattServer.connected)); |
| -}, 'Device will connect'); |
| + .then(device => assert_promise_rejects_with_message( |
| + device.gatt.getPrimaryService('heart_rate'), |
| + new DOMException('GATT Server is disconnected. Cannot retrieve services.', |
| + 'NetworkError'))); |
| +}, 'Call getPrimaryService before connecting. Reject with NetworkError.'); |
|
Jeffrey Yasskin
2016/07/28 22:45:14
"Called getPrimaryService", I think.
ortuno
2016/07/29 16:11:51
Done.
|
| </script> |