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

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: Rebase 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_builtin_roots_database_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 79%
copy from tests/standalone/io/secure_no_builtin_roots_test.dart
copy to tests/standalone/io/secure_builtin_roots_test.dart
index c411e62c03ccf95c6d3ee8abec70f3631f1b9477..edfffad2b0f375b3971b8e520de5b7e85a530dc1 100644
--- a/tests/standalone/io/secure_no_builtin_roots_test.dart
+++ b/tests/standalone/io/secure_builtin_roots_test.dart
@@ -13,18 +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 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() {
« no previous file with comments | « tests/standalone/io/secure_builtin_roots_database_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698