aboutsummaryrefslogtreecommitdiffstats
path: root/components/bluetooth/test.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-22 05:55:02 -0600
committerGitHub <noreply@github.com>2016-11-22 05:55:02 -0600
commita89ba50180532bc652db7ff649f252ffdca33177 (patch)
tree700944f2c8ae1def77aba511273074bdbb1b6590 /components/bluetooth/test.rs
parentf747ff95cdb03cdf66735d3975de4793147ba07f (diff)
parentf98fbecfda503946717cb1391a531d9e3059b467 (diff)
downloadservo-a89ba50180532bc652db7ff649f252ffdca33177.tar.gz
servo-a89ba50180532bc652db7ff649f252ffdca33177.zip
Auto merge of #14206 - szeged:blacklist-to-blocklist, r=jdm
Rename blacklist to blocklist in WebBluetooth <!-- Please describe your changes on the following line: --> There was a renaming in the [specification](https://github.com/WebBluetoothCG/web-bluetooth/commit/1d5cfa4ee8790df0cbbd68cda2dd148ba4efe10f). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14206) <!-- Reviewable:end -->
Diffstat (limited to 'components/bluetooth/test.rs')
-rw-r--r--components/bluetooth/test.rs42
1 files changed, 21 insertions, 21 deletions
diff --git a/components/bluetooth/test.rs b/components/bluetooth/test.rs
index ed0b296f2ba..ee84fcc976a 100644
--- a/components/bluetooth/test.rs
+++ b/components/bluetooth/test.rs
@@ -43,7 +43,7 @@ const EMPTY_NAME_HEART_RATE_ADAPTER: &'static str = "EmptyNameHeartRateAdapter";
const NO_NAME_HEART_RATE_ADAPTER: &'static str = "NoNameHeartRateAdapter";
// https://cs.chromium.org/chromium/src/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h?l=284
const TWO_HEART_RATE_SERVICES_ADAPTER: &'static str = "TwoHeartRateServicesAdapter";
-const BLACKLIST_TEST_ADAPTER: &'static str = "BlacklistTestAdapter";
+const BLOCKLIST_TEST_ADAPTER: &'static str = "BlocklistTestAdapter";
// Device names
const CONNECTABLE_DEVICE_NAME: &'static str = "Connectable Device";
@@ -63,7 +63,7 @@ const HEART_RATE_DEVICE_ADDRESS: &'static str = "00:00:00:00:00:03";
const UNICODE_DEVICE_ADDRESS: &'static str = "00:00:00:00:00:01";
// Service UUIDs
-const BLACKLIST_TEST_SERVICE_UUID: &'static str = "611c954a-263b-4f4a-aab6-01ddb953f985";
+const BLOCKLIST_TEST_SERVICE_UUID: &'static str = "611c954a-263b-4f4a-aab6-01ddb953f985";
// https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.device_information.xml
const DEVICE_INFORMATION_UUID: &'static str = "0000180a-0000-1000-8000-00805f9b34fb";
// https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.generic_access.xml
@@ -79,7 +79,7 @@ const HUMAN_INTERFACE_DEVICE_SERVICE_UUID: &'static str = "00001812-0000-1000-80
const TX_POWER_SERVICE_UUID: &'static str = "00001804-0000-1000-8000-00805f9b34fb";
// Characteristic UUIDs
-const BLACKLIST_EXCLUDE_READS_CHARACTERISTIC_UUID: &'static str = "bad1c9a2-9a5b-4015-8b60-1579bbbf2135";
+const BLOCKLIST_EXCLUDE_READS_CHARACTERISTIC_UUID: &'static str = "bad1c9a2-9a5b-4015-8b60-1579bbbf2135";
// https://www.bluetooth.com/specifications/gatt/
// viewer?attributeXmlFile=org.bluetooth.characteristic.body_sensor_location.xml
const BODY_SENSOR_LOCATION_CHARACTERISTIC_UUID: &'static str = "00002a38-0000-1000-8000-00805f9b34fb";
@@ -97,8 +97,8 @@ const PERIPHERAL_PRIVACY_FLAG_CHARACTERISTIC_UUID: &'static str = "00002a02-0000
const SERIAL_NUMBER_STRING_UUID: &'static str = "00002a25-0000-1000-8000-00805f9b34fb";
// Descriptor UUIDs
-const BLACKLIST_EXCLUDE_READS_DESCRIPTOR_UUID: &'static str = "aaaaaaaa-aaaa-1181-0510-810819516110";
-const BLACKLIST_DESCRIPTOR_UUID: &'static str = "07711111-6104-0970-7011-1107105110aaa";
+const BLOCKLIST_EXCLUDE_READS_DESCRIPTOR_UUID: &'static str = "aaaaaaaa-aaaa-1181-0510-810819516110";
+const BLOCKLIST_DESCRIPTOR_UUID: &'static str = "07711111-6104-0970-7011-1107105110aaa";
// https://www.bluetooth.com/specifications/gatt/
// viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.characteristic_user_description.xml
const CHARACTERISTIC_USER_DESCRIPTION_UUID: &'static str = "00002901-0000-1000-8000-00805f9b34fb";
@@ -374,33 +374,33 @@ fn create_two_heart_rate_services_device(adapter: &BluetoothAdapter) -> Result<(
Ok(())
}
-fn create_blacklisted_device(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
+fn create_blocklisted_device(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
let connectable_device =
try!(create_device_with_uuids(adapter,
CONNECTABLE_DEVICE_NAME.to_owned(),
CONNECTABLE_DEVICE_ADDRESS.to_owned(),
- vec![BLACKLIST_TEST_SERVICE_UUID.to_owned(),
+ vec![BLOCKLIST_TEST_SERVICE_UUID.to_owned(),
DEVICE_INFORMATION_UUID.to_owned(),
GENERIC_ACCESS_SERVICE_UUID.to_owned(),
HEART_RATE_SERVICE_UUID.to_owned(),
HUMAN_INTERFACE_DEVICE_SERVICE_UUID.to_owned()]));
- let blacklist_test_service = try!(create_service(&connectable_device, BLACKLIST_TEST_SERVICE_UUID.to_owned()));
+ let blocklist_test_service = try!(create_service(&connectable_device, BLOCKLIST_TEST_SERVICE_UUID.to_owned()));
- let blacklist_exclude_reads_characteristic =
- try!(create_characteristic(&blacklist_test_service,
- BLACKLIST_EXCLUDE_READS_CHARACTERISTIC_UUID.to_owned()));
- try!(blacklist_exclude_reads_characteristic
+ let blocklist_exclude_reads_characteristic =
+ try!(create_characteristic(&blocklist_test_service,
+ BLOCKLIST_EXCLUDE_READS_CHARACTERISTIC_UUID.to_owned()));
+ try!(blocklist_exclude_reads_characteristic
.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
- let _blacklist_exclude_reads_descriptor =
- try!(create_descriptor_with_value(&blacklist_exclude_reads_characteristic,
- BLACKLIST_EXCLUDE_READS_DESCRIPTOR_UUID.to_owned(),
+ let _blocklist_exclude_reads_descriptor =
+ try!(create_descriptor_with_value(&blocklist_exclude_reads_characteristic,
+ BLOCKLIST_EXCLUDE_READS_DESCRIPTOR_UUID.to_owned(),
vec![54; 3]));
- let _blacklist_descriptor =
- try!(create_descriptor_with_value(&blacklist_exclude_reads_characteristic,
- BLACKLIST_DESCRIPTOR_UUID.to_owned(),
+ let _blocklist_descriptor =
+ try!(create_descriptor_with_value(&blocklist_exclude_reads_characteristic,
+ BLOCKLIST_DESCRIPTOR_UUID.to_owned(),
vec![54; 3]));
let device_information_service = try!(create_service(&connectable_device, DEVICE_INFORMATION_UUID.to_owned()));
@@ -490,10 +490,10 @@ pub fn test(manager: &mut BluetoothManager, data_set_name: String) -> Result<(),
let _ = try!(create_two_heart_rate_services_device(adapter));
},
- BLACKLIST_TEST_ADAPTER => {
- try!(set_adapter(adapter, BLACKLIST_TEST_ADAPTER.to_owned()));
+ BLOCKLIST_TEST_ADAPTER => {
+ try!(set_adapter(adapter, BLOCKLIST_TEST_ADAPTER.to_owned()));
- let _ = try!(create_blacklisted_device(adapter));
+ let _ = try!(create_blocklisted_device(adapter));
},
_ => return Err(Box::from(WRONG_DATA_SET_ERROR.to_string())),
}