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

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

Issue 12378040: Add missing certificate getter on HttpClientResponse and add a regression test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix long line. Created 7 years, 10 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 | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/https_client_certificate_test.dart
diff --git a/tests/standalone/io/https_client_certificate_test.dart b/tests/standalone/io/https_client_certificate_test.dart
index 1d9b0e4180c6d867d85c887a716b59e2500cd44c..9c519eb386d08e50682c39adeb95a0c65c15260c 100644
--- a/tests/standalone/io/https_client_certificate_test.dart
+++ b/tests/standalone/io/https_client_certificate_test.dart
@@ -28,8 +28,12 @@ Function test() {
HttpClient client = new HttpClient();
client.getUrl(Uri.parse("https://$HOST_NAME:${server.port}/"))
.then((request) => request.close())
- .then((response) =>
- response.reduce(<int>[], (message, data) => message..addAll(data)))
+ .then((response) {
+ Expect.equals('CN=localhost', response.certificate.subject);
+ Expect.equals('CN=myauthority', response.certificate.issuer);
+ return response.reduce(<int>[],
+ (message, data) => message..addAll(data));
+ })
.then((message) {
String received = new String.fromCharCodes(message);
Expect.equals(received, "Hello");
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698