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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/readValue.html

Issue 1573183002: bluetooth: Update BluetoothCharacteristic.value on readValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use anonymous namespace Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/bluetooth/BluetoothGATTCharacteristic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/bluetooth/readValue.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/readValue.html b/third_party/WebKit/LayoutTests/bluetooth/readValue.html
index 343f978682b021ae12c02d077f3961e74a3431b3..a5b0e53ed0083169454e3cd35c4cab8de4577535 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/readValue.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/readValue.html
@@ -86,4 +86,20 @@ promise_test(() => {
assert_equals(value_str, 'Heart Rate Device');
});
}, 'Request for characteristic. Should return right characteristic');
+
+promise_test(() => {
+ testRunner.setBluetoothMockDataSet('HeartRateAdapter');
+ return requestDeviceWithKeyDown({filters: [{services: ['heart_rate']}]})
+ .then(device => device.connectGATT())
+ .then(gattServer => gattServer.getPrimaryService('generic_access'))
+ .then(service => service.getCharacteristic('gap.device_name'))
+ .then(characteristic => {
+ assert_equals(characteristic.value, null);
+ return characteristic.readValue().then(() => {
+ let decoder = new TextDecoder('utf-8');
+ let value_str = decoder.decode(characteristic.value);
+ assert_equals(value_str, 'Heart Rate Device');
+ })
+ });
+}, 'Request for characteristic. Should update characteristic.value');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/bluetooth/BluetoothGATTCharacteristic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698