| Index: tests/utils/uri_test.dart
|
| diff --git a/tests/utils/uri_test.dart b/tests/utils/uri_test.dart
|
| index ff03d4a35e19747844392b33c32dec047d68db15..91451a2bde4f964c1dc07ef99f5cd9d8488fd219 100644
|
| --- a/tests/utils/uri_test.dart
|
| +++ b/tests/utils/uri_test.dart
|
| @@ -106,6 +106,29 @@ main() {
|
| Expect.stringEquals("http://a/b/g;p/h;s",
|
| base.resolve("../g;p/h;s").toString());
|
|
|
| + Expect.stringEquals(
|
| + "http://example.com",
|
| + new Uri.fromString("http://example.com/a/b/c").origin);
|
| + Expect.stringEquals(
|
| + "https://example.com",
|
| + new Uri.fromString("https://example.com/a/b/c").origin);
|
| + Expect.stringEquals(
|
| + "http://example.com:1234",
|
| + new Uri.fromString("http://example.com:1234/a/b/c").origin);
|
| + Expect.stringEquals(
|
| + "https://example.com:1234",
|
| + new Uri.fromString("https://example.com:1234/a/b/c").origin);
|
| + Expect.stringEquals("http:", const Uri("http", null, null).origin);
|
| + Expect.stringEquals("http://:80", const Uri("http", null, null, 80).origin);
|
| +
|
| + var expectedException = null;
|
| + try {
|
| + var s = const Uri("file://").origin;
|
| + } catch (IllegalArgumentException e) {
|
| + expectedException = e;
|
| + }
|
| + Expect.isNotNull(expectedException, "origin for non-http/https should fail");
|
| +
|
| // URI encode tests
|
| // Note: dart2js won't handle '\ud800\udc00' and frog
|
| // won't handle '\u{10000}'. So we cons this up synthetically...
|
|
|