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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/writeValue/write-updates-value.html

Issue 1844153002: bluetooth: Split writeValue tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-testrunner-mojo
Patch Set: Merge Created 4 years, 9 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 | « third_party/WebKit/LayoutTests/bluetooth/writeValue/write-succeeds.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/bluetooth/writeValue/write-updates-value.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-updates-value.html b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-updates-value.html
new file mode 100644
index 0000000000000000000000000000000000000000..b5d3f6b44cf894d0b4984982c2ac2556b0e20b8f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-updates-value.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../resources/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+ return setBluetoothFakeAdapter('HeartRateAdapter')
+ .then(() => requestDeviceWithKeyDown({
+ filters: [{services: ['heart_rate']}],
+ optionalServices: ['generic_access']}))
+ .then(device => device.gatt.connect())
+ .then(gattServer => gattServer.getPrimaryService('generic_access'))
+ .then(service => service.getCharacteristic('gap.device_name'))
+ .then(characteristic => {
+ assert_equals(characteristic.value, null);
+ let textEncoder = new TextEncoder();
+ let newValue = textEncoder.encode('foo');
+ return characteristic.writeValue(newValue).then(() => {
+ assert_array_equals(characteristic.value.buffer, newValue.buffer);
+ });
+ });
+}, 'A regular write request to a writable characteristic should update value.');
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/bluetooth/writeValue/write-succeeds.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698