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

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

Issue 10917064: Throw an error if the ServerSocket host argument is invalid. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check exception. Created 8 years, 3 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 | « runtime/bin/socket_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_exception_test.dart
diff --git a/tests/standalone/io/socket_exception_test.dart b/tests/standalone/io/socket_exception_test.dart
index 924822dae3e93571c9dd2fd9ac5515a557d15311..0a8ea889235b34fcbf1154f7f2d489d2ba086b34 100644
--- a/tests/standalone/io/socket_exception_test.dart
+++ b/tests/standalone/io/socket_exception_test.dart
@@ -28,6 +28,10 @@ class SocketExceptionTest {
}
Expect.equals(false, exceptionCaught);
Expect.equals(true, !wrongExceptionCaught);
+
+ // Test invalid host.
+ Expect.throws(() => new ServerSocket("__INVALID_HOST__", PORT, 10),
+ (e) => e is SocketIOException);
}
static void clientSocketExceptionTest() {
@@ -198,6 +202,7 @@ class SocketExceptionTest {
clientSocketExceptionTest();
indexOutOfRangeExceptionTest();
unknownHostTest();
+
// TODO(sgjesse): This test seems to fail on the buildbot.
//unresponsiveHostTest();
}
« no previous file with comments | « runtime/bin/socket_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698