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

Unified Diff: tests/standalone/io/https_bad_certificate_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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: tests/standalone/io/https_bad_certificate_test.dart
diff --git a/tests/standalone/io/https_bad_certificate_test.dart b/tests/standalone/io/https_bad_certificate_test.dart
index 6205bb39948af0fe4b4e627f915312ef83527d2e..96b014407d46afb050e441f2a38a11e725ce3248 100644
--- a/tests/standalone/io/https_bad_certificate_test.dart
+++ b/tests/standalone/io/https_bad_certificate_test.dart
@@ -20,7 +20,7 @@ String localFile(path) => Platform.script.resolve(path).toFilePath();
SecurityContext serverContext = new SecurityContext()
..useCertificateChain(localFile('certificates/server_chain.pem'))
..usePrivateKey(localFile('certificates/server_key.pem'),
- password: 'dartdart');
+ password: 'dartdart');
class CustomException {}
@@ -28,8 +28,7 @@ main() async {
var HOST = (await InternetAddress.lookup(HOST_NAME)).first;
var server = await HttpServer.bindSecure(HOST, 0, serverContext, backlog: 5);
server.listen((request) {
- request.listen((_) {
- }, onDone: () {
+ request.listen((_) {}, onDone: () {
request.response.close();
});
});
@@ -54,11 +53,8 @@ main() async {
server.close();
}
-
-Future runClient(int port,
- SecurityContext context,
- callbackReturns,
- result) async {
+Future runClient(
+ int port, SecurityContext context, callbackReturns, result) async {
HttpClient client = new HttpClient(context: context);
client.badCertificateCallback = (X509Certificate certificate, host, port) {
Expect.isTrue(certificate.subject.contains('rootauthority'));

Powered by Google App Engine
This is Rietveld 408576698