| Index: tests/standalone/io/secure_no_builtin_roots_database_test.dart
|
| diff --git a/tests/standalone/io/secure_no_builtin_roots_database_test.dart b/tests/standalone/io/secure_no_builtin_roots_database_test.dart
|
| index 6c4c06a3fbe9082537301a73dbeca9fff34ad0ea..7f1276bf8097031dac44ddcd045e6c9d58c1191b 100644
|
| --- a/tests/standalone/io/secure_no_builtin_roots_database_test.dart
|
| +++ b/tests/standalone/io/secure_no_builtin_roots_database_test.dart
|
| @@ -9,16 +9,23 @@ import "dart:isolate";
|
| import "dart:async";
|
|
|
| void testGoogleUrl() {
|
| - ReceivePort keepAlive = new ReceivePort();
|
| - HttpClient client = new HttpClient();
|
| - client.getUrl(Uri.parse('https://www.google.com'))
|
| - .then((request) => request.close())
|
| - .then((response) => Expect.fail("Unexpected successful connection"))
|
| - .catchError((error) {
|
| - Expect.isTrue(error is HandshakeException);
|
| - keepAlive.close();
|
| - client.close();
|
| - });
|
| + // We need to use an external server here because it is backed by a
|
| + // built-in root certificate authority.
|
| + InternetAddress.lookup('www.google.com').then((_) {
|
| + ReceivePort keepAlive = new ReceivePort();
|
| + HttpClient client = new HttpClient();
|
| + client.getUrl(Uri.parse('https://www.google.com'))
|
| + .then((request) => request.close())
|
| + .then((response) => Expect.fail("Unexpected successful connection"))
|
| + .catchError((error) {
|
| + Expect.isTrue(error is HandshakeException);
|
| + keepAlive.close();
|
| + client.close();
|
| + });
|
| + },
|
| + onError: (e) {
|
| + Expect.isTrue(e is SocketException);
|
| + });
|
| }
|
|
|
| void InitializeSSL() {
|
|
|