Index: third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-without-starting.html b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html |
similarity index 56% |
copy from third_party/WebKit/LayoutTests/bluetooth/notifications/stop-without-starting.html |
copy to third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html |
index 7cbb02923277a8249db0a1bc80b9830129cd2025..f7506d96775c92ba0c151d0cc98f8ec3107fa7d2 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/notifications/stop-without-starting.html |
+++ b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html |
@@ -8,9 +8,9 @@ promise_test(() => { |
return setBluetoothFakeAdapter('HeartRateAdapter') |
.then(() => requestDeviceWithKeyDown({ |
filters: [{services: ['heart_rate']}]})) |
- .then(device => device.gatt.connect()) |
- .then(gattServer => gattServer.getPrimaryService('heart_rate')) |
- .then(service => service.getCharacteristic('heart_rate_measurement')) |
- .then(characteristic => characteristic.stopNotifications()); |
-}, "Stop without starting."); |
+ .then(device => assert_promise_rejects_with_message( |
+ device.gatt.getPrimaryServices('heart_rate'), |
+ new DOMException('GATT Server is disconnected. Cannot retrieve services.', |
+ 'NetworkError'))); |
+}, 'getPrimaryServices called before connecting. Reject with NetworkError.'); |
</script> |