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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/blacklisted-services-with-uuid.html

Issue 2048933005: bluetooth: Improve NOT_ALLOWED_TO_ACCESS_SERVICE error message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 4 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 <!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/bluetooth-helpers.js"></script> 4 <script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
5 <script> 5 <script>
6 'use strict'; 6 'use strict';
7 promise_test(() => { 7 promise_test(() => {
8 return setBluetoothFakeAdapter('BlacklistTestAdapter') 8 return setBluetoothFakeAdapter('BlacklistTestAdapter')
9 .then(() => requestDeviceWithKeyDown({ 9 .then(() => requestDeviceWithKeyDown({
10 filters: [{services: ['device_information']}], 10 filters: [{services: ['device_information']}],
11 optionalServices: ['human_interface_device']})) 11 optionalServices: ['human_interface_device']}))
12 .then(device => device.gatt.connect()) 12 .then(device => device.gatt.connect())
13 .then(gattServer => assert_promise_rejects_with_message( 13 .then(gattServer => assert_promise_rejects_with_message(
14 gattServer.getPrimaryServices('human_interface_device'), 14 gattServer.getPrimaryServices('human_interface_device'),
15
15 new DOMException('Origin is not allowed to access the service. ' + 16 new DOMException('Origin is not allowed to access the service. ' +
16 'Remember to add the service to a filter or to ' + 17 'Tip: Add the service UUID to \'optionalServices\' ' +
17 'optionalServices in requestDevice().', 18 'in requestDevice() options. https://goo.gl/HxfxSQ',
18 'SecurityError'))); 19 'SecurityError')));
19 }, 'Request for services. Does not return blacklisted service.'); 20 }, 'Request for services. Does not return blacklisted service.');
20 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698