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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/script-tests/server/invalid-service-name.js

Issue 2874873003: bluetooth: Implement simulateGATTConnectionResponse() (Closed)
Patch Set: fix Created 3 years, 6 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
1 'use strict'; 1 'use strict';
2 promise_test(() => { 2 promise_test(() => {
3 return setBluetoothFakeAdapter('HeartRateAdapter') 3 return getHealthThermometerDevice()
4 .then(() => requestDeviceWithKeyDown({ 4 .then(([device]) => {
5 filters: [{services: ['heart_rate']}]}))
6 .then(device => device.gatt.connect())
7 .then(gatt => {
8 return assert_promise_rejects_with_message( 5 return assert_promise_rejects_with_message(
9 gatt.CALLS([ 6 device.gatt.CALLS([
10 getPrimaryService('wrong_name')| 7 getPrimaryService('wrong_name')|
11 getPrimaryServices('wrong_name') 8 getPrimaryServices('wrong_name')
12 ]), 9 ]),
13 new DOMException( 10 new DOMException(
14 'Failed to execute \'FUNCTION_NAME\' on ' + 11 'Failed to execute \'FUNCTION_NAME\' on ' +
15 '\'BluetoothRemoteGATTServer\': Invalid Service name: ' + 12 '\'BluetoothRemoteGATTServer\': Invalid Service name: ' +
16 '\'wrong_name\'. ' + 13 '\'wrong_name\'. ' +
17 'It must be a valid UUID alias (e.g. 0x1234), ' + 14 'It must be a valid UUID alias (e.g. 0x1234), ' +
18 'UUID (lowercase hex characters e.g. ' + 15 'UUID (lowercase hex characters e.g. ' +
19 '\'00001234-0000-1000-8000-00805f9b34fb\'), ' + 16 '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
20 'or recognized standard name from ' + 17 'or recognized standard name from ' +
21 'https://www.bluetooth.com/specifications/gatt/services' + 18 'https://www.bluetooth.com/specifications/gatt/services' +
22 ' e.g. \'alert_notification\'.', 19 ' e.g. \'alert_notification\'.',
23 'TypeError'), 20 'TypeError'),
24 'Wrong Service name passed.'); 21 'Wrong Service name passed.');
25 }); 22 });
26 }, 'Wrong Service name. Reject with TypeError.'); 23 }, 'Wrong Service name. Reject with TypeError.');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698