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

Side by Side Diff: LayoutTests/bluetooth/getPrimaryService.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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 promise_test(() => { 81 promise_test(() => {
82 testRunner.setBluetoothMockDataSet('GenericAccessAdapter'); 82 testRunner.setBluetoothMockDataSet('GenericAccessAdapter');
83 return requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]}) 83 return requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]})
84 .then(device => device.connectGATT()) 84 .then(device => device.connectGATT())
85 .then(gattServer => { 85 .then(gattServer => {
86 return assert_promise_rejects_with_message( 86 return assert_promise_rejects_with_message(
87 gattServer.getPrimaryService('wrong_name'), { 87 gattServer.getPrimaryService('wrong_name'), {
88 name: 'SyntaxError', 88 name: 'SyntaxError',
89 message: 'Failed to execute \'getPrimaryService\' on ' + 89 message: 'Failed to execute \'getPrimaryService\' on ' +
90 '\'BluetoothGATTRemoteServer\': Invalid Service name: ' + 90 '\'BluetoothGATTRemoteServer\': Invalid Service name: ' +
91 '\'wrong_name\'.' 91 '\'wrong_name\'. ' +
92 'It must be a valid UUID alias (e.g. 0x1234), ' +
93 'UUID (lowercase hex characters e.g. ' +
94 '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
95 'or recognized standard name from ' +
96 'https://developer.bluetooth.org/gatt/services/Pages/Services Home.aspx' +
97 ' e.g. \'alert_notification\'.'
92 }, 'Wrong Service name passed.'); 98 }, 'Wrong Service name passed.');
93 }); 99 });
94 }, 'Wrong Service name. Reject with SyntaxError.'); 100 }, 'Wrong Service name. Reject with SyntaxError.');
95 </script> 101 </script>
OLDNEW
« no previous file with comments | « LayoutTests/bluetooth/getCharacteristic.html ('k') | Source/modules/bluetooth/BluetoothUUID.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698