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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-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: Clean up 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/disconnected-device-with-uuid.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/connect/get-same-gatt-server.html b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html
similarity index 56%
copy from third_party/WebKit/LayoutTests/bluetooth/connect/get-same-gatt-server.html
copy to third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html
index a5e188544fd6455909500ea0fd26a98e69367ae7..babd6219706f379ebeac6309eeb376d7ff89e378 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/connect/get-same-gatt-server.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html
@@ -8,10 +8,9 @@ promise_test(() => {
return setBluetoothFakeAdapter('HeartRateAdapter')
.then(() => requestDeviceWithKeyDown({
filters: [{services: ['heart_rate']}]}))
- .then(device => {
- return Promise.all([device.gatt.connect(), device.gatt.connect()])
- }).then(gattServers => {
- assert_equals(gattServers[0], gattServers[1]);
- });
-}, 'Multiple connects should return the same gatt object.');
+ .then(device => assert_promise_rejects_with_message(
+ device.gatt.getPrimaryServices('heart_rate'),
+ new DOMException('GATT Server is disconnected. Cannot retrieve services.',
+ 'NetworkError')));
+}, 'Call getPrimaryServices before connecting. Reject with NetworkError.');
</script>

Powered by Google App Engine
This is Rietveld 408576698