| Index: chrome/test/data/extensions/api_test/bluetooth_low_energy/notify_characteristic_value_changed/runtest.js
|
| diff --git a/chrome/test/data/extensions/api_test/bluetooth_low_energy/create_descriptor/runtest.js b/chrome/test/data/extensions/api_test/bluetooth_low_energy/notify_characteristic_value_changed/runtest.js
|
| similarity index 56%
|
| copy from chrome/test/data/extensions/api_test/bluetooth_low_energy/create_descriptor/runtest.js
|
| copy to chrome/test/data/extensions/api_test/bluetooth_low_energy/notify_characteristic_value_changed/runtest.js
|
| index ff84148cca346c0e9ac889518827b2c7a3ab0520..31f7b2e207c5876b9e33065084bb72f7140243b1 100644
|
| --- a/chrome/test/data/extensions/api_test/bluetooth_low_energy/create_descriptor/runtest.js
|
| +++ b/chrome/test/data/extensions/api_test/bluetooth_low_energy/notify_characteristic_value_changed/runtest.js
|
| @@ -24,27 +24,28 @@ chrome.bluetoothLowEnergy.createService(service, function(serviceId) {
|
| return;
|
|
|
| var characteristic = { uuid: '00001234-0000-1000-8000-00805f9b34fa',
|
| - properties: ['read'] };
|
| + properties: ['notify']};
|
| chrome.bluetoothLowEnergy.createCharacteristic(characteristic, serviceId,
|
| - function(characteristicId) {
|
| + function(characteristicId) {
|
| if (failOnError(characteristicId))
|
| - return;
|
| -
|
| - var descriptor = { uuid: '00001234-0000-1000-8000-00805f9b34fc',
|
| - permissions: ['read'] };
|
| - // Invalid characteristic ID.
|
| - chrome.bluetoothLowEnergy.createDescriptor(descriptor,
|
| - 'invalidCharacteristicId', function(descriptorId) {
|
| - if (failOnSuccess())
|
| + return;
|
| + chrome.bluetoothLowEnergy.registerService(serviceId, function() {
|
| + if (failOnError('result'))
|
| return;
|
|
|
| - // Valid characteristic ID.
|
| - chrome.bluetoothLowEnergy.createDescriptor(descriptor, characteristicId,
|
| - function(descriptorId) {
|
| - if (failOnError(descriptorId))
|
| + var bytes = [0xBA, 0xAD, 0x72, 0xF0, 0x0D, 0x65];
|
| + var newValue = (new Uint8Array(bytes)).buffer;
|
| + chrome.bluetoothLowEnergy.notifyCharacteristicValueChanged(
|
| + 'invalid_id', {value: newValue, shouldIndicate: false}, function() {
|
| + if (failOnSuccess())
|
| return;
|
| -
|
| - chrome.test.succeed();
|
| + chrome.bluetoothLowEnergy.notifyCharacteristicValueChanged(
|
| + characteristicId, {value: newValue, shouldIndicate: false},
|
| + function() {
|
| + if (failOnError('result'))
|
| + return;
|
| + chrome.test.succeed();
|
| + });
|
| });
|
| });
|
| });
|
|
|