Index: third_party/WebKit/LayoutTests/bluetooth/readValue/read-succeeds.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/readValue/read-succeeds.html |
similarity index 65% |
copy from third_party/WebKit/LayoutTests/bluetooth/writeValue/write-succeeds.html |
copy to third_party/WebKit/LayoutTests/bluetooth/readValue/read-succeeds.html |
index 5b37b3c12eae7e19cfe3b3ef6e7678fd13f9d555..e10b3276ac2de5d1888913d191ccfb13530300f3 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-succeeds.html |
+++ b/third_party/WebKit/LayoutTests/bluetooth/readValue/read-succeeds.html |
@@ -12,9 +12,11 @@ promise_test(() => { |
.then(device => device.gatt.connect()) |
.then(gattServer => gattServer.getPrimaryService('generic_access')) |
.then(service => service.getCharacteristic('gap.device_name')) |
- .then(characteristic => Promise.all([ |
- characteristic.writeValue(new Uint8Array(1 /* length */)), |
- characteristic.writeValue(new ArrayBuffer(1 /* length */)), |
- characteristic.writeValue(new DataView(new ArrayBuffer(1 /* length */)))])); |
-}, 'A regular write request to a writable characteristic should succeed.'); |
+ .then(characteristic => characteristic.readValue()) |
+ .then(value => { |
+ let decoder = new TextDecoder('utf-8'); |
+ let value_str = decoder.decode(value); |
+ assert_equals(value_str, 'Heart Rate Device'); |
+ }); |
+}, 'A read request succeeds and returns the charactersitic\'s value.'); |
Jeffrey Yasskin
2016/04/19 17:48:45
sp: charactersitic -> characteristic
ortuno
2016/04/19 20:04:29
Done.
|
</script> |