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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html

Issue 2664003002: Serialize calling of characteristic.writeValue in LayoutTests. (Closed)
Patch Set: Created 3 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 | 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/characteristic/writeValue/write-succeeds.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html
index 5c27141076f38e88a90b75e06455859ffedbd147..7e2548790b061ea6025929042bffa7aa30ed9b3c 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/characteristic/writeValue/write-succeeds.html
@@ -5,6 +5,8 @@
<script>
'use strict';
promise_test(() => {
+ let length = 1;
+ let characteristic;
return setBluetoothFakeAdapter('HeartRateAdapter')
.then(() => requestDeviceWithKeyDown({
filters: [{services: ['heart_rate']}],
@@ -12,9 +14,9 @@ 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 */)))]));
+ .then(c => characteristic = c)
+ .then(() => characteristic.writeValue(new Uint8Array(length)))
+ .then(() => characteristic.writeValue(new ArrayBuffer(length)))
+ .then(() => characteristic.writeValue(new DataView(new ArrayBuffer(length))))
ortuno 2017/01/30 23:28:52 nit: you are missing a semicolon.
}, 'A regular write request to a writable characteristic should succeed.');
</script>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698