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

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

Issue 12295014: Remove deprecated Strings class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/string_test.dart ('k') | tests/standalone/io/secure_socket_test.dart » ('j') | 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
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 Expect.isTrue(certificate.startValidity < new DateTime.now()); 56 Expect.isTrue(certificate.startValidity < new DateTime.now());
57 Expect.isTrue(certificate.endValidity > new DateTime.now()); 57 Expect.isTrue(certificate.endValidity > new DateTime.now());
58 return acceptCertificate; 58 return acceptCertificate;
59 }; 59 };
60 secure.onData = () { 60 secure.onData = () {
61 Expect.isTrue(acceptCertificate); 61 Expect.isTrue(acceptCertificate);
62 chunks.add(new String.fromCharCodes(secure.read())); 62 chunks.add(new String.fromCharCodes(secure.read()));
63 }; 63 };
64 secure.onClosed = () { 64 secure.onClosed = () {
65 Expect.isTrue(acceptCertificate); 65 Expect.isTrue(acceptCertificate);
66 String fullPage = Strings.concatAll(chunks); 66 String fullPage = chunks.join();
67 Expect.isTrue(fullPage.contains('</body></html>')); 67 Expect.isTrue(fullPage.contains('</body></html>'));
68 completer.complete(null); 68 completer.complete(null);
69 }; 69 };
70 secure.onError = (e) { 70 secure.onError = (e) {
71 Expect.isFalse(acceptCertificate); 71 Expect.isFalse(acceptCertificate);
72 completer.complete(null); 72 completer.complete(null);
73 }; 73 };
74 return completer.future; 74 return completer.future;
75 } 75 }
OLDNEW
« no previous file with comments | « tests/language/string_test.dart ('k') | tests/standalone/io/secure_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698