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

Side by Side Diff: LayoutTests/bluetooth/getCharacteristic.html

Issue 1315443007: bluetooth: Explain why standard names aren't recognized in error message. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge TOT Created 5 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/bluetooth/getPrimaryService.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/bluetooth-helpers.js"></script> 4 <script src="resources/bluetooth-helpers.js"></script>
5 <script> 5 <script>
6 'use strict'; 6 'use strict';
7 7
8 test(t => { assert_true(window.testRunner instanceof Object); t.done(); }, 8 test(t => { assert_true(window.testRunner instanceof Object); t.done(); },
9 'window.testRunner is required for the following tests.'); 9 'window.testRunner is required for the following tests.');
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 testRunner.setBluetoothMockDataSet('GenericAccessAdapter'); 102 testRunner.setBluetoothMockDataSet('GenericAccessAdapter');
103 return requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]}) 103 return requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]})
104 .then(device => device.connectGATT()) 104 .then(device => device.connectGATT())
105 .then(gattServer => gattServer.getPrimaryService('generic_access')) 105 .then(gattServer => gattServer.getPrimaryService('generic_access'))
106 .then(service => { 106 .then(service => {
107 return assert_promise_rejects_with_message( 107 return assert_promise_rejects_with_message(
108 service.getCharacteristic('wrong_name'), { 108 service.getCharacteristic('wrong_name'), {
109 name: 'SyntaxError', 109 name: 'SyntaxError',
110 message: 'Failed to execute \'getCharacteristic\' on ' + 110 message: 'Failed to execute \'getCharacteristic\' on ' +
111 '\'BluetoothGATTService\': \Invalid Characteristic name: ' + 111 '\'BluetoothGATTService\': \Invalid Characteristic name: ' +
112 '\'wrong_name\'.' 112 '\'wrong_name\'. ' +
113 'It must be a valid UUID alias (e.g. 0x1234), ' +
114 'UUID (lowercase hex characters e.g. ' +
115 '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
116 'or recognized standard name from ' +
117 'https://developer.bluetooth.org/gatt/characteristics/Pages/C haracteristicsHome.aspx' +
118 ' e.g. \'aerobic_heart_rate_lower_limit\'.'
113 }, 'Wrong Characteristic name passed.'); 119 }, 'Wrong Characteristic name passed.');
114 }); 120 });
115 }, 'Wrong Characteristic name. Reject with SyntaxError.'); 121 }, 'Wrong Characteristic name. Reject with SyntaxError.');
116 </script> 122 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/bluetooth/getPrimaryService.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698