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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/chooser/new-scan-all-types.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/bluetooth/requestDevice/chooser/new-scan-all-types.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice/chooser/new-scan-all-types.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/chooser/new-scan-all-types.html
new file mode 100644
index 0000000000000000000000000000000000000000..6d3a8c906f5dffb9b262984a15ee00a8528a439b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/chooser/new-scan-all-types.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+ testRunner.setBluetoothManualChooser(true);
+
+ let requestDevicePromise =
+ setBluetoothFakeAdapter('DeviceEventAdapter')
+ .then(() => requestDeviceWithKeyDown({
+ filters: [
+ {services: ['heart_rate']},
+ {services: ['battery_service']},
+ {services: ['tx_power']},
+ {services: ['generic_access']},
+ {services: ['glucose']}]
+ }));
+ return getBluetoothManualChooserEvents(7).then(events => {
+ assert_equals(events[0], 'chooser-opened(file://)');
+ let idsByName = new AddDeviceEventSet();
+ idsByName.assert_add_device_event(events[1]);
+ assert_true(idsByName.has('Connected Heart Rate Device'));
+ assert_equals(events[2], 'discovering');
+ idsByName.assert_add_device_event(events[3]);
+ idsByName.assert_add_device_event(events[4]);
+ idsByName.assert_add_device_event(events[5]);
+ assert_true(idsByName.has('New Glucose Device'), 'Glucose Device');
+ assert_true(idsByName.has('Changing Battery Device'), 'Battery Device');
+ assert_true(idsByName.has('Discovery Generic Access Device',
+ 'Generic Access Device'));
+ assert_equals(events[6], 'discovery-idle');
+ testRunner.sendBluetoothManualChooserEvent(
+ 'selected', idsByName.get('Connected Heart Rate Device'));
+ return requestDevicePromise;
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698