Index: tests/standalone/io/http_client_exception_test.dart |
diff --git a/tests/standalone/io/http_client_exception_test.dart b/tests/standalone/io/http_client_exception_test.dart |
index e557e8d6db8e38c10c49063071264eab941c5a25..75cc659f7fdc372734d58711254107ada0d8a305 100644 |
--- a/tests/standalone/io/http_client_exception_test.dart |
+++ b/tests/standalone/io/http_client_exception_test.dart |
@@ -11,7 +11,14 @@ import "package:expect/expect.dart"; |
void testInvalidUrl() { |
HttpClient client = new HttpClient(); |
Expect.throws( |
- () => client.getUrl(Uri.parse('ftp://www.google.com'))); |
+ () => client.getUrl(Uri.parse('ftp://www.google.com')), |
+ (e) => e.toString().contains("Unsupported scheme")); |
+ Expect.throws( |
+ () => client.getUrl(Uri.parse('httpx://www.google.com')), |
+ (e) => e.toString().contains("Unsupported scheme")); |
+ Expect.throws( |
+ () => client.getUrl(Uri.parse('http://::1')), |
Bill Hesse
2013/11/08 14:54:32
Also add a test for http:///index.html?
Søren Gjesse
2013/11/28 13:47:19
Good point. Added http:///, /// and ///index.html
|
+ (e) => e.toString().contains("No host specified")); |
} |
void testBadHostName() { |