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

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

Issue 1319703002: Breaking Change: merge BoringSSL branch into master (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/https_server_test.dart ('k') | tests/standalone/io/https_unauthorized_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/https_unauthorized_client.dart
diff --git a/tests/standalone/io/https_unauthorized_client.dart b/tests/standalone/io/https_unauthorized_client.dart
index 925ccba9b3c40740fac3a055b826b58ccb99ad99..673fdf041a5233dec87400678dabfaae9e46ab72 100644
--- a/tests/standalone/io/https_unauthorized_client.dart
+++ b/tests/standalone/io/https_unauthorized_client.dart
@@ -15,9 +15,9 @@ class ExpectException implements Exception {
String message;
}
-void expect(condition) {
+void expect(condition, message) {
if (!condition) {
- throw new ExpectException('');
+ throw new ExpectException(message);
}
}
@@ -31,16 +31,19 @@ Future runClients(int port) {
testFutures.add(
client.getUrl(Uri.parse('https://$HOST_NAME:$port/'))
.then((HttpClientRequest request) {
- expect(false);
+ expect(false, "Request succeeded");
}, onError: (e) {
- expect(e is HandshakeException || e is SocketException);
+ // Remove ArgumentError once null default context is supported.
+ expect(e is HandshakeException ||
+ e is SocketException ||
+ e is ArgumentError,
+ "Error is wrong type: $e");
}));
}
return Future.wait(testFutures);
}
void main(List<String> args) {
- SecureSocket.initialize();
runClients(int.parse(args[0]))
.then((_) => print('SUCCESS'));
}
« no previous file with comments | « tests/standalone/io/https_server_test.dart ('k') | tests/standalone/io/https_unauthorized_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698