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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.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({acceptAllDevices: true}) 11 return setBluetoothFakeAdapter('HeartRateAdapter')
12 .then(([device]) => assert_promise_rejects_with_message( 12 .then(() => requestDeviceWithKeyDown({
13 device.gatt.getPrimaryServices(), 13 filters: [{name: 'Heart Rate Device'}]}))
14 .then(device => device.gatt.connect())
15 .then(gattServer => assert_promise_rejects_with_message(
16 gattServer.getPrimaryServices(),
14 new DOMException('Origin is not allowed to access any service. Tip: ' + 17 new DOMException('Origin is not allowed to access any service. Tip: ' +
15 'Add the service UUID to \'optionalServices\' in ' + 18 'Add the service UUID to \'optionalServices\' in ' +
16 'requestDevice() options. https://goo.gl/HxfxSQ', 19 'requestDevice() options. https://goo.gl/HxfxSQ',
17 'SecurityError'))); 20 'SecurityError')));
18 }, 'Request for present service without permission to access any service. ' + 21 }, 'Request for present service without permission to access any service. ' +
19 'Reject with SecurityError.'); 22 'Reject with SecurityError.');
23 </script>
20 24
21 </script> 25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698