Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before-with-uuid.html

Issue 2183903002: bluetooth: Reject getPrimaryService(s) if frame is not connected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Docs Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before-with-uuid.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/delayed-discovery-service-not-found.html b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before-with-uuid.html
similarity index 52%
copy from third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/delayed-discovery-service-not-found.html
copy to third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before-with-uuid.html
index 93a68e0d4946a88b26ef2d3be97e48e0ca7706c3..02ff61d001b6371f36d57dc0c99a9ec0d0756246 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/delayed-discovery-service-not-found.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before-with-uuid.html
@@ -5,17 +5,17 @@
<script>
'use strict';
promise_test(() => {
- return setBluetoothFakeAdapter('DelayedServicesDiscoveryAdapter')
+ return setBluetoothFakeAdapter('TwoHeartRateServicesAdapter')
.then(() => requestDeviceWithKeyDown({
filters: [{services: ['heart_rate']}],
- optionalServices: ['battery_service']}))
+ optionalServices: ['generic_access']}))
.then(device => device.gatt.connect())
.then(gattServer => {
+ gattServer.disconnect();
return assert_promise_rejects_with_message(
- gattServer.getPrimaryService('battery_service'),
- new DOMException('No Services with specified UUID found in Device.',
- 'NotFoundError'));
+ gattServer.getPrimaryServices('heart_rate'),
+ new DOMException('GATT Server is disconnected. Cannot retrieve services.',
+ 'NetworkError'));
});
-}, 'Request for absent service. Must reject with NotFoundError even when the ' +
- 'services are not immediately discovered');
+}, 'disconnect() called before getPrimaryServices. Reject with NetworkError.');
</script>

Powered by Google App Engine
This is Rietveld 408576698