| OLD | NEW |
| 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // to call GattCharacteristicValueChanged from js. | 478 // to call GattCharacteristicValueChanged from js. |
| 479 // https://crbug.com/543884 | 479 // https://crbug.com/543884 |
| 480 // - GetProperties: Returns | 480 // - GetProperties: Returns |
| 481 // BluetoothGattCharacteristic::PROPERTY_NOTIFY | 481 // BluetoothGattCharacteristic::PROPERTY_NOTIFY |
| 482 // - Body Sensor Location (0x2a38) | 482 // - Body Sensor Location (0x2a38) |
| 483 // - Mock Functions: | 483 // - Mock Functions: |
| 484 // - Read: Calls GattCharacteristicValueChanged and success | 484 // - Read: Calls GattCharacteristicValueChanged and success |
| 485 // callback with [1] which corresponds to chest. | 485 // callback with [1] which corresponds to chest. |
| 486 // - GetProperties: Returns | 486 // - GetProperties: Returns |
| 487 // BluetoothGattCharacteristic::PROPERTY_READ | 487 // BluetoothGattCharacteristic::PROPERTY_READ |
| 488 // - Body Sensor Location (0x2a38) |
| 489 // - Mock Functions: |
| 490 // - Read: Calls GattCharacteristicValueChanged and success |
| 491 // callback with [2] which corresponds to wrist. |
| 492 // - GetProperties: Returns |
| 493 // BluetoothGattCharacteristic::PROPERTY_READ |
| 488 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>> | 494 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>> |
| 489 GetHeartRateService(device::MockBluetoothAdapter* adapter, | 495 GetHeartRateService(device::MockBluetoothAdapter* adapter, |
| 490 device::MockBluetoothDevice* device); | 496 device::MockBluetoothDevice* device); |
| 491 | 497 |
| 492 // Characteristics | 498 // Characteristics |
| 493 | 499 |
| 494 // |BaseCharacteristic|(service, uuid) | 500 // |BaseCharacteristic|(identifier, service, uuid) |
| 495 // Descriptors added: | 501 // Descriptors added: |
| 496 // None. | 502 // None. |
| 497 // Mock Functions: | 503 // Mock Functions: |
| 498 // - TODO(ortuno): http://crbug.com/483347 GetDescriptors: | 504 // - TODO(ortuno): http://crbug.com/483347 GetDescriptors: |
| 499 // Returns: all descriptors added to the characteristic | 505 // Returns: all descriptors added to the characteristic |
| 500 // - TODO(ortuno): http://crbug.com/483347 GetDescriptor: | 506 // - TODO(ortuno): http://crbug.com/483347 GetDescriptor: |
| 501 // Returns the descriptor matching the identifier provided if the | 507 // Returns the descriptor matching the identifier provided if the |
| 502 // descriptor was added to the characteristic. | 508 // descriptor was added to the characteristic. |
| 503 // - GetIdentifier: | 509 // - GetIdentifier: |
| 504 // Returns: uuid + “ Identifier” | 510 // Returns: identifier |
| 505 // - GetUUID: | 511 // - GetUUID: |
| 506 // Returns: uuid | 512 // Returns: uuid |
| 507 // - IsLocal: | 513 // - IsLocal: |
| 508 // Returns: false | 514 // Returns: false |
| 509 // - GetService: | 515 // - GetService: |
| 510 // Returns: service | 516 // Returns: service |
| 511 // - GetProperties: | 517 // - GetProperties: |
| 512 // Returns: NULL | 518 // Returns: NULL |
| 513 // - GetPermissions: | 519 // - GetPermissions: |
| 514 // Returns: NULL | 520 // Returns: NULL |
| 515 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>> | 521 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>> |
| 516 GetBaseGATTCharacteristic( | 522 GetBaseGATTCharacteristic( |
| 523 const std::string& identifier, |
| 517 device::MockBluetoothGattService* service, | 524 device::MockBluetoothGattService* service, |
| 518 const std::string& uuid, | 525 const std::string& uuid, |
| 519 device::BluetoothGattCharacteristic::Properties properties); | 526 device::BluetoothGattCharacteristic::Properties properties); |
| 520 | 527 |
| 521 // |ErrorCharacteristic|(service, error_type) | 528 // |ErrorCharacteristic|(service, error_type) |
| 522 // Inherits from BaseCharacteristic(service, errorUUID(error_type + 0xA1)) | 529 // Inherits from BaseCharacteristic(service, errorUUID(error_type + 0xA1)) |
| 523 // Descriptors added: | 530 // Descriptors added: |
| 524 // None. | 531 // None. |
| 525 // Mock Functions: | 532 // Mock Functions: |
| 526 // - ReadRemoteCharacteristic: | 533 // - ReadRemoteCharacteristic: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 | 574 |
| 568 // Function to turn an integer into an MAC address of the form | 575 // Function to turn an integer into an MAC address of the form |
| 569 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 576 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) |
| 570 // returns "00:00:DE:AD:BE:EF". | 577 // returns "00:00:DE:AD:BE:EF". |
| 571 static std::string makeMACAddress(uint64_t addr); | 578 static std::string makeMACAddress(uint64_t addr); |
| 572 }; | 579 }; |
| 573 | 580 |
| 574 } // namespace content | 581 } // namespace content |
| 575 | 582 |
| 576 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ | 583 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ |
| OLD | NEW |