New Uri.parse and validation.

Ensures that the resulting URI is valid.
Escapes invalid characters except the gen-delim group of delimites, where
escapes are allowed.

R=ajohnsen@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//335373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/json_rpc_2@37479 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/test/server/parameters_test.dart b/test/server/parameters_test.dart
index 49e4573..64fe232 100644
--- a/test/server/parameters_test.dart
+++ b/test/server/parameters_test.dart
@@ -262,7 +262,9 @@
       expect(() => parameters['invalid-uri'].asUri,
           throwsInvalidParams('Parameter "invalid-uri" for method "foo" must '
               'be a valid URI, but was "http://[::1".\n'
-              'Bad end of IPv6 host'));
+              'Missing end `]` to match `[` in host at position 7.\n'
+              'http://[::1\n'
+              '       ^'));
     });
 
     group("with a nested parameter map", () {