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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-invalid-service-name.html

Issue 2921233002: Revert of bluetooth: Implement simulateGATTConnectionResponse() (Closed)
Patch Set: 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 <!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py --> 1 <!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
2 <!DOCTYPE html> 2 <!DOCTYPE html>
3 <script src="../../../resources/testharness.js"></script> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script> 5 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
6 <script src="../../../resources/bluetooth/web-bluetooth-test.js"></script> 6 <script src="../../../resources/bluetooth/web-bluetooth-test.js"></script>
7 <script src="../../../resources/mojo-helpers.js"></script> 7 <script src="../../../resources/mojo-helpers.js"></script>
8 <script> 8 <script>
9 'use strict'; 9 'use strict';
10 promise_test(() => { 10 promise_test(() => {
11 return getHealthThermometerDevice() 11 return setBluetoothFakeAdapter('HeartRateAdapter')
12 .then(([device]) => { 12 .then(() => requestDeviceWithKeyDown({
13 filters: [{services: ['heart_rate']}]}))
14 .then(device => device.gatt.connect())
15 .then(gatt => {
13 return assert_promise_rejects_with_message( 16 return assert_promise_rejects_with_message(
14 device.gatt.getPrimaryService('wrong_name'), 17 gatt.getPrimaryService('wrong_name'),
15 new DOMException( 18 new DOMException(
16 'Failed to execute \'getPrimaryService\' on ' + 19 'Failed to execute \'getPrimaryService\' on ' +
17 '\'BluetoothRemoteGATTServer\': Invalid Service name: ' + 20 '\'BluetoothRemoteGATTServer\': Invalid Service name: ' +
18 '\'wrong_name\'. ' + 21 '\'wrong_name\'. ' +
19 'It must be a valid UUID alias (e.g. 0x1234), ' + 22 'It must be a valid UUID alias (e.g. 0x1234), ' +
20 'UUID (lowercase hex characters e.g. ' + 23 'UUID (lowercase hex characters e.g. ' +
21 '\'00001234-0000-1000-8000-00805f9b34fb\'), ' + 24 '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
22 'or recognized standard name from ' + 25 'or recognized standard name from ' +
23 'https://www.bluetooth.com/specifications/gatt/services' + 26 'https://www.bluetooth.com/specifications/gatt/services' +
24 ' e.g. \'alert_notification\'.', 27 ' e.g. \'alert_notification\'.',
25 'TypeError'), 28 'TypeError'),
26 'Wrong Service name passed.'); 29 'Wrong Service name passed.');
27 }); 30 });
28 }, 'Wrong Service name. Reject with TypeError.'); 31 }, 'Wrong Service name. Reject with TypeError.');
29 32
30 </script> 33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698