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/https_unauthorized_test.dart

Issue 23189002: dart:io | Add test for HttpClient requests that never complete their future. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add suppressions and issue number in standalone.status. Created 7 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
Index: tests/standalone/io/https_unauthorized_test.dart
diff --git a/tests/standalone/io/https_bad_certificate_test.dart b/tests/standalone/io/https_unauthorized_test.dart
similarity index 69%
copy from tests/standalone/io/https_bad_certificate_test.dart
copy to tests/standalone/io/https_unauthorized_test.dart
index 90236809de01c5a9988505d4b53dfccfd9cf96fb..f8fe73181245547aba197e70e0ec6d536622e054 100644
--- a/tests/standalone/io/https_bad_certificate_test.dart
+++ b/tests/standalone/io/https_unauthorized_test.dart
@@ -2,7 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// This test verifies that the bad certificate callback works in HttpClient.
+// This test verifies that secure connections that fail due to
+// unauthenticated certificates throw exceptions in HttpClient.
import "package:expect/expect.dart";
import "package:path/path.dart";
@@ -29,15 +30,15 @@ Future<SecureServerSocket> runServer() {
void main() {
final options = new Options();
- var clientScript =
- join(dirname(options.script), 'https_bad_certificate_client.dart');
+ var clientScript = join(dirname(options.script),
+ 'https_unauthorized_client.dart');
- Future clientProcess(int port, String acceptCertificate) {
+ Future clientProcess(int port) {
return Process.run(options.executable,
- [clientScript, port.toString(), acceptCertificate])
+ [clientScript, port.toString()])
.then((ProcessResult result) {
if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
- print("Client failed, acceptCertificate: $acceptCertificate");
+ print("Client failed");
print(" stdout:");
print(result.stdout);
print(" stderr:");
@@ -48,10 +49,7 @@ void main() {
}
runServer().then((server) {
- Future.wait([clientProcess(server.port, 'true'),
- clientProcess(server.port, 'false'),
- clientProcess(server.port, 'fisk'),
- clientProcess(server.port, 'exception')]).then((_) {
+ clientProcess(server.port).then((_) {
server.close();
});
});
« no previous file with comments | « tests/standalone/io/https_unauthorized_client.dart ('k') | tests/standalone/io/secure_unauthorized_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698