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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/server/connect/same-gatt-server-both-receive-disconnect-event.html

Issue 2718583002: Refactor WebBluetoothServiceClient in the web_bluetooth.mojom (Closed)
Patch Set: address more comments Created 3 years, 9 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
5 <script>
6 'use strict';
7 var device;
8 promise_test(() => {
9 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter')
10 .then(() => requestDeviceWithKeyDown({
11 filters: [{services: ['health_thermometer']}],
12 optionalServices: [request_disconnection_service_uuid]
13 }))
14 .then(requestedDevice => {
15 device = requestedDevice;
16 return Promise.all([device.gatt.connect(), device.gatt.connect()]);
17 }).then(gattServers => get_request_disconnection(gattServers[0]))
18 .then(requestDisconnection => {
19 // This promise hangs unless gattserverdisconnected is fired.
20 let disconnected = eventPromise(device, 'gattserverdisconnected');
21 return Promise.all([requestDisconnection(), disconnected]);
22 });
23 }, 'A device disconnecting after two consecutive connect requests should fire an event.');
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698