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

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

Issue 13956011: dart:io | Add two more tests for SecureSocket builtin certificates. (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
Index: tests/standalone/io/secure_builtin_roots_test.dart
diff --git a/tests/standalone/io/secure_no_builtin_roots_test.dart b/tests/standalone/io/secure_builtin_roots_test.dart
similarity index 75%
copy from tests/standalone/io/secure_no_builtin_roots_test.dart
copy to tests/standalone/io/secure_builtin_roots_test.dart
index a93404c2c767d4144dc611456c78faefb59bae78..edfffad2b0f375b3971b8e520de5b7e85a530dc1 100644
--- a/tests/standalone/io/secure_no_builtin_roots_test.dart
+++ b/tests/standalone/io/secure_builtin_roots_test.dart
@@ -13,19 +13,17 @@ void testGoogleUrl() {
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 AsyncError);
- Expect.isTrue(error.error is SocketIOException);
- keepAlive.close();
+ .then((response) => response.last)
+ .then((_) {
client.close();
+ keepAlive.close();
});
}
void InitializeSSL() {
// If the built-in root certificates aren't loaded, the connection
// should signal an error.
- SecureSocket.initialize(useBuiltinRoots: false);
+ SecureSocket.initialize(useBuiltinRoots: true);
}
void main() {

Powered by Google App Engine
This is Rietveld 408576698