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

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

Issue 14083007: Add new InternetAddress class with a static lookup function (including IPv6 results). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add Windows support and update ssl tests to use 'localhost'. Created 7 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/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 658d5601326159c230d98fde3b5149af7a05d974..5b58e8273968d9e6c766aed05d1d5d44228a6afc 100644
--- a/tests/standalone/io/secure_socket_bad_certificate_test.dart
+++ b/tests/standalone/io/secure_socket_bad_certificate_test.dart
@@ -31,12 +31,10 @@ void main() {
}
Future testCertificateCallback({String host, bool acceptCertificate}) {
- Expect.throws(
- () {
- var x = 7;
- SecureSocket.connect(host, 443, onBadCertificate: x);
- },
- (e) => e is ArgumentError || e is TypeError);
+ var x = 7;
+ SecureSocket.connect(host, 443, onBadCertificate: x)
+ .catchError((e) {},
+ test: (e) => e is ArgumentError || e is TypeError);
bool badCertificateCallback(X509Certificate certificate) {
Expect.isTrue(certificate.subject.contains("O=Google Inc"));

Powered by Google App Engine
This is Rietveld 408576698