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/getPrimaryServices/gen-service-device-disconnects-before-with-uuid.html

Issue 2423853002: bluetooth: Add script to generate tests based on templates (Closed)
Patch Set: Remove replace loop Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-device-disconnects-before-with-uuid.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-before-with-uuid.html b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-device-disconnects-before-with-uuid.html
similarity index 63%
rename from third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-before-with-uuid.html
rename to third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-device-disconnects-before-with-uuid.html
index e7eaa60ec224d5ee107bb19c1d20bbf23bc493b2..29ff56830a24efbad46bfdd0ebabb2d8b16ec222 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-before-with-uuid.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-device-disconnects-before-with-uuid.html
@@ -1,3 +1,4 @@
+<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
@@ -12,13 +13,18 @@ promise_test(t => {
}))
.then(device => {
return device.gatt.connect()
- .then(gattServer => gattServer.getPrimaryService(request_disconnection_service_uuid))
- .then(service => service.getCharacteristic(request_disconnection_characteristic_uuid))
- .then(requestDisconnection => requestDisconnection.writeValue(new Uint8Array([0])))
+ .then(gattServer => gattServer.getPrimaryService(
+ request_disconnection_service_uuid))
+ .then(service => service.getCharacteristic(
+ request_disconnection_characteristic_uuid))
+ .then(requestDisconnection => requestDisconnection.writeValue(
+ new Uint8Array([0])))
.then(() => assert_promise_rejects_with_message(
device.gatt.getPrimaryServices('heart_rate'),
- new DOMException('GATT Server is disconnected. Cannot retrieve services.',
- 'NetworkError')));
+ new DOMException(
+ 'GATT Server is disconnected. Cannot retrieve services.',
+ 'NetworkError')));
});
}, 'Device disconnects before getPrimaryServices. Reject with NetworkError.');
+
</script>

Powered by Google App Engine
This is Rietveld 408576698