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..e3e5957028e1f911a1b1181c3753ec90adf13d83 100644 |
--- a/tests/standalone/io/http_client_exception_test.dart |
+++ b/tests/standalone/io/http_client_exception_test.dart |
@@ -11,7 +11,26 @@ 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')), |
+ (e) => e.toString().contains("No host specified")); |
+ Expect.throws( |
+ () => client.getUrl(Uri.parse('http:///')), |
+ (e) => e.toString().contains("No host specified")); |
+ Expect.throws( |
+ () => client.getUrl(Uri.parse('http:///index.html')), |
+ (e) => e.toString().contains("No host specified")); |
+ Expect.throws( |
+ () => client.getUrl(Uri.parse('///')), |
+ (e) => e.toString().contains("No host specified")); |
+ Expect.throws( |
+ () => client.getUrl(Uri.parse('///index.html')), |
+ (e) => e.toString().contains("No host specified")); |
} |
void testBadHostName() { |