Index: third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnect-called-before.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/disconnect/disconnect-once.html b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnect-called-before.html |
similarity index 62% |
copy from third_party/WebKit/LayoutTests/bluetooth/disconnect/disconnect-once.html |
copy to third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnect-called-before.html |
index 2309ba81420d027c253476c9b232878d6dba9fb2..b9ca3ef368690615d867e5818c54da2a887eed6e 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/disconnect/disconnect-once.html |
+++ b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnect-called-before.html |
@@ -4,9 +4,6 @@ |
<script src="../../resources/bluetooth/bluetooth-helpers.js"></script> |
<script> |
'use strict'; |
-// TODO(ortuno): Write tests to check that "Disconnect" was actually |
-// called on the device. |
-// http://crbug.com/569716 |
promise_test(() => { |
return setBluetoothFakeAdapter('HeartRateAdapter') |
.then(() => requestDeviceWithKeyDown({ |
@@ -14,7 +11,10 @@ promise_test(() => { |
.then(device => device.gatt.connect()) |
.then(gattServer => { |
gattServer.disconnect(); |
- assert_false(gattServer.connected); |
+ return assert_promise_rejects_with_message( |
+ gattServer.getPrimaryService('heart_rate'), |
+ new DOMException('GATT Server is disconnected. Cannot retrieve services.', |
+ 'NetworkError')); |
}); |
-}, '\'connected\' is set to false after disconnect is called.'); |
+}, 'disconnect() called before getPrimaryService. Reject with NetworkError.'); |
</script> |