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

Side by Side Diff: third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js

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
« no previous file with comments | « third_party/WebKit/LayoutTests/bluetooth/requestDevice/restart-scan-includes-previous-device.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 'use strict'; 1 'use strict';
2 2
3 // Bluetooth UUID constants: 3 // Bluetooth UUID constants:
4 // Services: 4 // Services:
5 var blacklist_test_service_uuid = "611c954a-263b-4f4a-aab6-01ddb953f985"; 5 var blacklist_test_service_uuid = "611c954a-263b-4f4a-aab6-01ddb953f985";
6 var request_disconnection_service_uuid = "01d7d889-7451-419f-aeb8-d65e7b9277af"; 6 var request_disconnection_service_uuid = "01d7d889-7451-419f-aeb8-d65e7b9277af";
7 // Characteristics: 7 // Characteristics:
8 var blacklist_exclude_reads_characteristic_uuid = 8 var blacklist_exclude_reads_characteristic_uuid =
9 "bad1c9a2-9a5b-4015-8b60-1579bbbf2135"; 9 "bad1c9a2-9a5b-4015-8b60-1579bbbf2135";
10 var request_disconnection_characteristic_uuid = 10 var request_disconnection_characteristic_uuid =
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Parses add-device(name)=id lines in 191 // Parses add-device(name)=id lines in
192 // testRunner.getBluetoothManualChooserEvents() output, and exposes the name->id 192 // testRunner.getBluetoothManualChooserEvents() output, and exposes the name->id
193 // mapping. 193 // mapping.
194 class AddDeviceEventSet { 194 class AddDeviceEventSet {
195 constructor() { 195 constructor() {
196 this._idsByName = new Map(); 196 this._idsByName = new Map();
197 this._addDeviceRegex = /^add-device\(([^)]+)\)=(.+)$/; 197 this._addDeviceRegex = /^add-device\(([^)]+)\)=(.+)$/;
198 } 198 }
199 assert_add_device_event(event, description) { 199 assert_add_device_event(event, description) {
200 let match = this._addDeviceRegex.exec(event); 200 let match = this._addDeviceRegex.exec(event);
201 assert_true(!!match, event + "isn't an add-device event: " + description); 201 assert_true(!!match, event + " isn't an add-device event: " + description);
202 this._idsByName.set(match[1], match[2]); 202 this._idsByName.set(match[1], match[2]);
203 } 203 }
204 has(name) { 204 has(name) {
205 return this._idsByName.has(name); 205 return this._idsByName.has(name);
206 } 206 }
207 get(name) { 207 get(name) {
208 return this._idsByName.get(name); 208 return this._idsByName.get(name);
209 } 209 }
210 } 210 }
211 211
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 filters: [{ services: services, name: 'Name' }], 334 filters: [{ services: services, name: 'Name' }],
335 optionalServices: ['heart_rate'] 335 optionalServices: ['heart_rate']
336 }, { 336 }, {
337 filters: [{ services: services, namePrefix: 'Pre' }], 337 filters: [{ services: services, namePrefix: 'Pre' }],
338 optionalServices: ['heart_rate'] 338 optionalServices: ['heart_rate']
339 }, { 339 }, {
340 filters: [{ services: services, name: 'Name', namePrefix: 'Pre' }], 340 filters: [{ services: services, name: 'Name', namePrefix: 'Pre' }],
341 optionalServices: ['heart_rate'] 341 optionalServices: ['heart_rate']
342 }]; 342 }];
343 } 343 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/bluetooth/requestDevice/restart-scan-includes-previous-device.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698