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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/stop-discovery-adapter-discovering-changed.html

Issue 2762023002: work in progress 2
Patch Set: 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
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> 5 <script>
6 'use strict'; 6 'use strict';
7 promise_test(() => { 7 promise_test(() => {
8 testRunner.setBluetoothManualChooser(true); 8 testRunner.setBluetoothManualChooser(true);
9 9
10 let requestDevicePromise = 10 let requestDevicePromise =
11 setBluetoothFakeAdapter('DeviceEventAdapter') 11 setBluetoothFakeAdapter('DeviceEventAdapter')
12 .then(() => requestDeviceWithKeyDown({ 12 .then(() => requestDeviceWithKeyDown({
13 filters: [{services: ['generic_access']}]})); 13 filters: [{services: ['glucose']}]}));
14 return getBluetoothManualChooserEvents(4).then(events => { 14 return getBluetoothManualChooserEvents(4).then(events => {
15 assert_equals(events[0], 'chooser-opened(file://)'); 15 assert_equals(events[0], 'chooser-opened(file://)');
16 assert_equals(events[1], 'discovering'); 16 assert_equals(events[1], 'discovering');
17 let idsByName = new AddDeviceEventSet(); 17 let idsByName = new AddDeviceEventSet();
18 idsByName.assert_add_device_event(events[2]); 18 idsByName.assert_add_device_event(events[2]);
19 assert_true(idsByName.has('Discovery Generic Access Device')); 19 assert_true(idsByName.has('New Glucose Device'));
20 assert_equals(events[3], 'discovery-idle'); 20 assert_equals(events[3], 'discovery-idle');
21 testRunner.sendBluetoothManualChooserEvent( 21 testRunner.sendBluetoothManualChooserEvent(
22 'selected', idsByName.get('Discovery Generic Access Device')); 22 'selected', idsByName.get('New Glucose Device'));
23 return requestDevicePromise; 23 return requestDevicePromise;
24 }); 24 });
25 }); 25 });
26 </script> 26 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/bluetooth/requestDevice/chooser/stop-discovery-adapter-discovering-changed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698