Switches characteristic to use BufferSource

This commit is contained in:
Anthony Urena 2018-03-24 16:10:28 -04:00
parent 40235da2d3
commit 5bf2e71407
6 changed files with 17 additions and 12 deletions

View file

@ -15,8 +15,8 @@ promise_test(() => {
.then(service => service.getCharacteristic(device_name.name))
.then(characteristic => {
assert_equals(characteristic.value, null);
return characteristic.writeValue(asciiToDecimal('foo'))
.then(() => assert_equals(characteristic.value, 'foo'));
return characteristic.writeValue(Uint8Array.of(1, 2))
.then(() => assert_equals(characteristic.value, '\x01\x02'));
});
}, 'A regular write request to a writable characteristic should update value.');
</script>

View file

@ -17,7 +17,7 @@ promise_test(() => {
.then(descriptor => {
assert_equals(descriptor.value, null);
return descriptor.writeValue(Uint8Array.of(1, 2))
.then(() => assert_equals(descriptor.value, "\x01\x02"));
.then(() => assert_equals(descriptor.value, '\x01\x02'));
});
}, 'A regular write request to a writable descriptor should update value.');
</script>