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

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

Issue 14036017: Revert "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: 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
« no previous file with comments | « tests/standalone/io/secure_session_resume_test.dart ('k') | tests/standalone/io/secure_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..658d5601326159c230d98fde3b5149af7a05d974 100644
--- a/tests/standalone/io/secure_socket_bad_certificate_test.dart
+++ b/tests/standalone/io/secure_socket_bad_certificate_test.dart
@@ -31,12 +31,12 @@ 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) {
- }
+ Expect.throws(
+ () {
+ var x = 7;
+ 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"));
« no previous file with comments | « tests/standalone/io/secure_session_resume_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