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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/multiple-matching-devices.html

Issue 2217573002: bluetooth: Only add new devices, connected devices and devices that changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-add-or-update
Patch Set: Fix typo Created 4 years, 4 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 promise_test(() => {
8 testRunner.setBluetoothManualChooser(true);
9 let requestDevicePromise =
10 setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
11 .then(() => requestDeviceWithKeyDown({
12 filters: [{services: ['glucose']},
13 {services: ['heart_rate']}]
14 }));
15 return getBluetoothManualChooserEvents(5)
16 .then(events => {
17 assert_equals(events.length, 5, events);
18 assert_equals(events[0], 'chooser-opened(file://)', 'events[0]');
19 let idsByName = new AddDeviceEventSet();
20 for (let addedDevice of [events[1], events[2]]) {
21 idsByName.assert_add_device_event(addedDevice);
22 }
23 assert_true(idsByName.has('Heart Rate Device'));
24 assert_true(idsByName.has('Glucose Device'));
25 assert_equals(events[3], 'discovering');
26 assert_equals(events[4], 'discovery-idle');
27 testRunner.sendBluetoothManualChooserEvent('selected',
28 idsByName.get('Glucose Device') );
29 return requestDevicePromise;
30 }).then(device => assert_equals(device.name, 'Glucose Device'));
31 }, 'The chooser includes all devices.');
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698