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

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

Issue 17589007: dart:io | Change names for SecureSocket exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix bad upload to review tool. Created 7 years, 6 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/secure_socket_bad_certificate_test.dart
diff --git a/tests/standalone/io/secure_socket_bad_certificate_test.dart b/tests/standalone/io/secure_socket_bad_certificate_test.dart
index 85b1cd3c714262369ec0c73ec70ac973244c4654..dbd13d1ebe48f51a94e6be963d70120e13f9fcd8 100644
--- a/tests/standalone/io/secure_socket_bad_certificate_test.dart
+++ b/tests/standalone/io/secure_socket_bad_certificate_test.dart
@@ -31,12 +31,9 @@ void main() {
}
Future testCertificateCallback({String host, bool acceptCertificate}) {
- try {
- var x = 7;
- SecureSocket.connect(host, 443, onBadCertificate: x)
- .catchError((e) {}, test: (e) => e is ArgumentError);
- } on TypeError catch (e) {
- }
+ var x = 7;
+ Expect.throws(() => SecureSocket.connect(host, 443, onBadCertificate: x),
+ (e) => e is ArgumentError || e is TypeError);
bool badCertificateCallback(X509Certificate certificate) {
Expect.isTrue(certificate.subject.contains("O=Google Inc"));
« runtime/bin/secure_socket.cc ('K') | « tests/standalone/io/secure_server_socket_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698