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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/script-tests/server/delayed-discovery-no-permission-for-any-service.js

Issue 2544513004: Fix WebBluetooth generator to distinguish between different methods. (Closed)
Patch Set: Remove TL;DR in README Created 4 years 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('DelayedServicesDiscoveryAdapter') 3 return setBluetoothFakeAdapter('DelayedServicesDiscoveryAdapter')
4 .then(() => requestDeviceWithKeyDown({ 4 .then(() => requestDeviceWithKeyDown({
5 filters: [{name: 'Heart Rate Device'}]})) 5 filters: [{name: 'Heart Rate Device'}]}))
6 .then(device => device.gatt.connect()) 6 .then(device => device.gatt.connect())
7 .then(gattServer => assert_promise_rejects_with_message( 7 .then(gattServer => assert_promise_rejects_with_message(
8 gattServer.CALLS([ 8 gattServer.CALLS([
9 getPrimaryService('heart_rate')| 9 getPrimaryService('heart_rate')|
10 getPrimaryServices()| 10 getPrimaryServices()|
11 getPrimaryServices('heart_rate')[UUID]]), 11 getPrimaryServices('heart_rate')[UUID]]),
12 new DOMException('Origin is not allowed to access any service. Tip: ' + 12 new DOMException('Origin is not allowed to access any service. Tip: ' +
13 'Add the service UUID to \'optionalServices\' in ' + 13 'Add the service UUID to \'optionalServices\' in ' +
14 'requestDevice() options. https://goo.gl/HxfxSQ', 14 'requestDevice() options. https://goo.gl/HxfxSQ',
15 'SecurityError'))); 15 'SecurityError')));
16 }, 'Delayed service discovery, request for present service without ' + 16 }, 'Delayed service discovery, request for present service without ' +
17 'permission to access any service. Reject with SecurityError.'); 17 'permission to access any service. Reject with SecurityError.');
18 </script> 18 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698