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

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: rebase 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 })
18 .then(gattServers => get_request_disconnection(gattServers[0]))
19 .then(requestDisconnection => {
20 // This promise hangs unless gattserverdisconnected is fired.
21 let disconnected = eventPromise(device, 'gattserverdisconnected');
22 return Promise.all([requestDisconnection(), disconnected]);
23 });
24 }, 'A device disconnecting after two consecutive connect requests should fire an event.');
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698