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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/characteristic-is-removed.js

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Implement WebBluetooth getDescriptor[s] Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 'use strict';
2 promise_test(() => {
3 let val = new Uint8Array([1]);
4 return setBluetoothFakeAdapter('HeartRateAdapter')
5 .then(() => requestDeviceWithKeyDown({
6 filters: [{services: ['heart_rate']}],
7 optionalServices: ['generic_access']}))
8 .then(device => device.gatt.connect())
9 .then(gattServer => gattServer.getPrimaryService('generic_access'))
10 .then(service => service.getCharacteristic('gap.device_name'))
11 .then(characteristic => {
12 return setBluetoothFakeAdapter('MissingCharacteristicHeartRateAdapter')
13 .then(() => assert_promise_rejects_with_message(
14 characteristic.CALLS([
15 getDescriptor(user_description.name)|
16 getDescriptors(user_description.name)[UUID]|
17 getDescriptors()|
18 readValue()|
19 writeValue(val)|
20 startNotifications()]),
21 new DOMException(
22 'GATT Characteristic no longer exists.',
23 'InvalidStateError'),
24 'Characteristic got removed.'));
25 });
26 }, 'Characteristic gets removed. Reject with InvalidStateError.');
27
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698