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

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

Issue 1898263002: bluetooth: Separate connection tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-get-primary-service
Patch Set: Add name to test Created 4 years, 7 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/disconnect/gc-detach.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-fails.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
index 5f5e121b9429a89fb172dc4c4c7ef19f539f6e68..f17621a781d420d414c5546ea550b34ea2d09a2b 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/writeValue/write-fails.html
@@ -4,20 +4,22 @@
<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
-gatt_errors_tests.forEach(testSpec => {
- promise_test(() => {
- return setBluetoothFakeAdapter('FailingGATTOperationsAdapter')
- .then(() => requestDeviceWithKeyDown({
- filters: [{services: [errorUUID(0xA0)]}]}))
- .then(device => device.gatt.connect())
- .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0)))
- .then(service => service.getCharacteristic(testSpec.uuid))
- .then(characteristic => {
- return assert_promise_rejects_with_message(
- characteristic.writeValue(new Uint8Array([1])),
- testSpec.error,
- 'Trying to write to a characteristic failed.');
+promise_test(() => {
+ return setBluetoothFakeAdapter('FailingGATTOperationsAdapter')
+ .then(() => requestDeviceWithKeyDown({
+ filters: [{services: [errorUUID(0xA0)]}]}))
+ .then(device => device.gatt.connect())
+ .then(gattServer => gattServer.getPrimaryService(errorUUID(0xA0)))
+ .then(service => {
+ let tests = Promise.resolve();
+ gatt_errors_tests.forEach(testSpec => {
+ tests = tests.then(() => service.getCharacteristic(testSpec.uuid))
+ .then(characteristic => assert_promise_rejects_with_message(
+ characteristic.writeValue(new Uint8Array([1])),
+ testSpec.error,
+ testSpec.testName));
});
- }, testSpec.testName);
+ return tests;
+ });
});
</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/bluetooth/disconnect/gc-detach.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698