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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/writeValue/device-goes-out-of-range.html

Issue 1844153002: bluetooth: Split writeValue tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-testrunner-mojo
Patch Set: Merge Created 4 years, 9 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/writeValue/device-goes-out-of-range.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/device-goes-out-of-range.html b/third_party/WebKit/LayoutTests/bluetooth/writeValue/device-goes-out-of-range.html
similarity index 58%
copy from third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/device-goes-out-of-range.html
copy to third_party/WebKit/LayoutTests/bluetooth/writeValue/device-goes-out-of-range.html
index d4ff49771ad9e9caafcdb556dd9634b1a0a8e889..0d55bfb77272f1cc6a3c20683b98c1f6cbb156db 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/device-goes-out-of-range.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue/device-goes-out-of-range.html
@@ -7,15 +7,17 @@
promise_test(() => {
return setBluetoothFakeAdapter('HeartRateAdapter')
.then(() => requestDeviceWithKeyDown({
- filters: [{services: ['heart_rate']}]}))
+ filters: [{services: ['heart_rate']}],
+ optionalServices: ['generic_access']}))
.then(device => device.gatt.connect())
- .then(gattServer => gattServer.getPrimaryService('heart_rate'))
- .then(service => {
+ .then(gattServer => gattServer.getPrimaryService('generic_access'))
+ .then(service => service.getCharacteristic('gap.device_name'))
+ .then(characteristic => {
return setBluetoothFakeAdapter('EmptyAdapter')
.then(() => assert_promise_rejects_with_message(
- service.getCharacteristics(),
- new DOMException('Bluetooth Device is no longer in range.',
- 'NetworkError'),
+ characteristic.writeValue(new ArrayBuffer(1 /* length */)),
+ new DOMException(
+ 'Bluetooth Device is no longer in range.', 'NetworkError'),
'Device went out of range.'));
});
}, 'Device goes out of range. Reject with NetworkError.');

Powered by Google App Engine
This is Rietveld 408576698