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

Side by Side Diff: tests/standalone/io/secure_socket_bad_certificate_test.dart

Issue 11553027: Add client certificates to HttpsServer and HttpClient. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove two stray lines. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/https_client_certificate_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // The --short_socket_write option does not work with external server 7 // The --short_socket_write option does not work with external server
8 // www.google.dk. Add this to the test when we have secure server sockets. 8 // www.google.dk. Add this to the test when we have secure server sockets.
9 // See TODO below. 9 // See TODO below.
10 10
11 #import("dart:isolate"); 11 import "dart:isolate";
12 #import("dart:io"); 12 import "dart:io";
13 13
14 void WriteAndClose(Socket socket, String message) { 14 void WriteAndClose(Socket socket, String message) {
15 var data = message.charCodes; 15 var data = message.charCodes;
16 int written = 0; 16 int written = 0;
17 void write() { 17 void write() {
18 written += socket.writeList(data, written, data.length - written); 18 written += socket.writeList(data, written, data.length - written);
19 if (written < data.length) { 19 if (written < data.length) {
20 socket.onWrite = write; 20 socket.onWrite = write;
21 } else { 21 } else {
22 socket.close(true); 22 socket.close(true);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 String fullPage = Strings.concatAll(chunks); 65 String fullPage = Strings.concatAll(chunks);
66 Expect.isTrue(fullPage.contains('</body></html>')); 66 Expect.isTrue(fullPage.contains('</body></html>'));
67 completer.complete(null); 67 completer.complete(null);
68 }; 68 };
69 secure.onError = (e) { 69 secure.onError = (e) {
70 Expect.isFalse(acceptCertificate); 70 Expect.isFalse(acceptCertificate);
71 completer.complete(null); 71 completer.complete(null);
72 }; 72 };
73 return completer.future; 73 return completer.future;
74 } 74 }
OLDNEW
« no previous file with comments | « tests/standalone/io/https_client_certificate_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698