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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/server/connect/get-same-gatt-server.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 <!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 src="../../../resources/bluetooth/web-bluetooth-test.js"></script>
6 <script src="../../../resources/mojo-helpers.js"></script>
7 <script> 5 <script>
8 'use strict'; 6 'use strict';
9 promise_test(() => { 7 promise_test(() => {
10 return getDiscoveredHealthThermometerDevice() 8 return setBluetoothFakeAdapter('HeartRateAdapter')
11 .then(([device, fake_peripheral]) => { 9 .then(() => requestDeviceWithKeyDown({
12 return fake_peripheral 10 filters: [{services: ['heart_rate']}]}))
13 .setNextGATTConnectionResponse({code: HCI_SUCCESS}) 11 .then(device => {
14 .then(() => device.gatt.connect()) 12 return Promise.all([device.gatt.connect(), device.gatt.connect()])
15 .then(gatt1 => { 13 }).then(gattServers => {
16 // No second response is necessary because an ATT Bearer 14 assert_equals(gattServers[0], gattServers[1]);
17 // already exists from the first connection. 15 });
18 // See https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothre motegattserver-connect
19 // step 5.1.
20 return device.gatt.connect().then(gatt2 => [gatt1, gatt2]);
21 });
22 })
23 .then(([gatt1, gatt2]) => assert_equals(gatt1, gatt2));
24 }, 'Multiple connects should return the same gatt object.'); 16 }, 'Multiple connects should return the same gatt object.');
25 </script> 17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698