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

Side by Side Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h

Issue 2554253002: bluetooth: web: Rename Blacklist to Blocklist (Closed)
Patch Set: Created 4 years 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // - Health Thermometer 389 // - Health Thermometer
390 // - Measurement Interval: 390 // - Measurement Interval:
391 // - StartNotifySession: Calls the success callback with a 391 // - StartNotifySession: Calls the success callback with a
392 // NotifySession whose Stop function: saves a callback and 392 // NotifySession whose Stop function: saves a callback and
393 // if |disconnect| is true disconnects the device. 393 // if |disconnect| is true disconnects the device.
394 // - CreateGattConnection: Runs success callback with a new GATT 394 // - CreateGattConnection: Runs success callback with a new GATT
395 // connection and runs any pending GATT operation callbacks. 395 // connection and runs any pending GATT operation callbacks.
396 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 396 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
397 GetStopNotifySessionFinishesAfterReconnectionAdapter(bool disconnect); 397 GetStopNotifySessionFinishesAfterReconnectionAdapter(bool disconnect);
398 398
399 // |BlacklistTestAdapter| 399 // |BlocklistTestAdapter|
400 // Inherits from |EmptyAdapter| 400 // Inherits from |EmptyAdapter|
401 // Internal Structure: 401 // Internal Structure:
402 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids) 402 // - |ConnectableDevice|(adapter, "Blocklist Test Device", uuids)
403 // - UUIDs: 403 // - UUIDs:
404 // - Blacklist Test Service UUID 404 // - Blocklist Test Service UUID
405 // (611c954a-263b-4f4a-aab6-01ddb953f985) 405 // (611c954a-263b-4f4a-aab6-01ddb953f985)
406 // - Device Information UUID (0x180a) 406 // - Device Information UUID (0x180a)
407 // - Generic Access UUID (0x1800) 407 // - Generic Access UUID (0x1800)
408 // - Heart Rate UUID (0x180d) 408 // - Heart Rate UUID (0x180d)
409 // - Human Interface Device UUID (0x1812) (a blacklisted service) 409 // - Human Interface Device UUID (0x1812) (a blocklisted service)
410 // - Services: 410 // - Services:
411 // - Blacklist Test Service - Characteristics as described in 411 // - Blocklist Test Service - Characteristics as described in
412 // GetBlacklistTestService. 412 // GetBlocklistTestService.
413 // - Device Information Service - Characteristics as described in 413 // - Device Information Service - Characteristics as described in
414 // GetDeviceInformationService. 414 // GetDeviceInformationService.
415 // - Generic Access Service - Characteristics as described in 415 // - Generic Access Service - Characteristics as described in
416 // GetGenericAccessService. 416 // GetGenericAccessService.
417 // - Heart Rate Service - Characteristics as described in 417 // - Heart Rate Service - Characteristics as described in
418 // GetHeartRateService. 418 // GetHeartRateService.
419 // - Human Interface Device Service - No characteristics needed 419 // - Human Interface Device Service - No characteristics needed
420 // because the service is blacklisted. 420 // because the service is blocklisted.
421 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 421 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
422 GetBlacklistTestAdapter(); 422 GetBlocklistTestAdapter();
423 423
424 // |DelayedServicesDiscoveryAdapter| 424 // |DelayedServicesDiscoveryAdapter|
425 // Inherits from |EmptyAdapter| 425 // Inherits from |EmptyAdapter|
426 // Internal Structure: 426 // Internal Structure:
427 // - Heart Rate Device 427 // - Heart Rate Device
428 // - Generic Access UUID (0x1800) 428 // - Generic Access UUID (0x1800)
429 // - Heart Rate UUID (0x180D) 429 // - Heart Rate UUID (0x180D)
430 // - Heart Rate Service (No services will be returned the first time 430 // - Heart Rate Service (No services will be returned the first time
431 // GetServices is called. Subsequent calls will 431 // GetServices is called. Subsequent calls will
432 // return the Heart Rate Service) 432 // return the Heart Rate Service)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // - GetDevice: 647 // - GetDevice:
648 // Returns: device 648 // Returns: device
649 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>> 649 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>>
650 GetBaseGATTService(const std::string& identifier, 650 GetBaseGATTService(const std::string& identifier,
651 device::MockBluetoothDevice* device, 651 device::MockBluetoothDevice* device,
652 const std::string& uuid); 652 const std::string& uuid);
653 653
654 // |DeviceInformationService| 654 // |DeviceInformationService|
655 // Internal Structure: 655 // Internal Structure:
656 // - Characteristics: 656 // - Characteristics:
657 // - Serial Number String: (0x2a25) (a blacklisted characteristic) 657 // - Serial Number String: (0x2a25) (a blocklisted characteristic)
658 // - Mock Functions: 658 // - Mock Functions:
659 // - Read: Fails test. 659 // - Read: Fails test.
660 // - GetProperties: Returns 660 // - GetProperties: Returns
661 // BluetoothRemoteGattCharacteristic::PROPERTY_READ 661 // BluetoothRemoteGattCharacteristic::PROPERTY_READ
662 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>> 662 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>>
663 GetDeviceInformationService(device::MockBluetoothDevice* device); 663 GetDeviceInformationService(device::MockBluetoothDevice* device);
664 664
665 // |BlacklistTestService| 665 // |BlocklistTestService|
666 // Internal Structure: 666 // Internal Structure:
667 // - Characteristics: 667 // - Characteristics:
668 // - Blacklist Exclude Reads Characteristic: 668 // - Blocklist Exclude Reads Characteristic:
669 // (bad1c9a2-9a5b-4015-8b60-1579bbbf2135) 669 // (bad1c9a2-9a5b-4015-8b60-1579bbbf2135)
670 // - Mock Functions: 670 // - Mock Functions:
671 // - Read: Fails test. 671 // - Read: Fails test.
672 // - Write: Calls success callback. 672 // - Write: Calls success callback.
673 // - GetProperties: Returns 673 // - GetProperties: Returns
674 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 674 // BluetoothRemoteGattCharacteristic::PROPERTY_READ |
675 // BluetoothRemoteGattCharacteristic::PROPERTY_WRITE 675 // BluetoothRemoteGattCharacteristic::PROPERTY_WRITE
676 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>> 676 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>>
677 GetBlacklistTestService(device::MockBluetoothDevice* device); 677 GetBlocklistTestService(device::MockBluetoothDevice* device);
678 678
679 // |GenericAccessService| 679 // |GenericAccessService|
680 // Internal Structure: 680 // Internal Structure:
681 // - Characteristics: 681 // - Characteristics:
682 // - Device Name: (0x2A00) 682 // - Device Name: (0x2A00)
683 // - Mock Functions: 683 // - Mock Functions:
684 // - Read: Calls success callback with device's name. 684 // - Read: Calls success callback with device's name.
685 // - Write: Calls success callback. 685 // - Write: Calls success callback.
686 // - GetProperties: Returns 686 // - GetProperties: Returns
687 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 687 // BluetoothRemoteGattCharacteristic::PROPERTY_READ |
688 // BluetoothRemoteGattCharacteristic::PROPERTY_WRITE 688 // BluetoothRemoteGattCharacteristic::PROPERTY_WRITE
689 // - Peripheral Privacy Flag: (0x2A02) (blacklisted for writes) 689 // - Peripheral Privacy Flag: (0x2A02) (blocklisted for writes)
690 // - Mock Functions: 690 // - Mock Functions:
691 // - Read: Calls success callback with boolean value 'false'. 691 // - Read: Calls success callback with boolean value 'false'.
692 // - Write: Fails test. 692 // - Write: Fails test.
693 // - GetProperties: Returns 693 // - GetProperties: Returns
694 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 694 // BluetoothRemoteGattCharacteristic::PROPERTY_READ |
695 // BluetoothRemoteGattCharacteristic::PROPERTY_WRITE 695 // BluetoothRemoteGattCharacteristic::PROPERTY_WRITE
696 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>> 696 static std::unique_ptr<testing::NiceMock<device::MockBluetoothGattService>>
697 GetGenericAccessService(device::MockBluetoothDevice* device); 697 GetGenericAccessService(device::MockBluetoothDevice* device);
698 698
699 // |HeartRateService| 699 // |HeartRateService|
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 825
826 // Function to turn an integer into an MAC address of the form 826 // Function to turn an integer into an MAC address of the form
827 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) 827 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef)
828 // returns "00:00:DE:AD:BE:EF". 828 // returns "00:00:DE:AD:BE:EF".
829 static std::string makeMACAddress(uint64_t addr); 829 static std::string makeMACAddress(uint64_t addr);
830 }; 830 };
831 831
832 } // namespace content 832 } // namespace content
833 833
834 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 834 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698