diff options
author | Adam Vartanian <flooey@google.com> | 2017-11-07 13:56:04 +0000 |
---|---|---|
committer | JP Sugarbroad <jpsugar@google.com> | 2018-01-11 15:18:47 -0800 |
commit | ff97586f14281559530932a1486e1446a547cda6 (patch) | |
tree | 92f769389c79c2aed84c2275af4c6ff4fade2555 | |
parent | a061dcc3b8191d2ce619d3c3e70227b2215ffe9e (diff) | |
download | cts-ff97586f14281559530932a1486e1446a547cda6.tar.gz |
DO NOT MERGE Add CTS test for URI fix.
Bug: 68341964
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: If532123542155ea3be281044a3ea4ca0b6cf2db5
(cherry picked from commit 880d3557229ff1b92dfa19b27638604f88ea8802)
-rw-r--r-- | tests/tests/net/src/android/net/cts/UriTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/tests/net/src/android/net/cts/UriTest.java b/tests/tests/net/src/android/net/cts/UriTest.java index ab337d01837..05e826a2c45 100644 --- a/tests/tests/net/src/android/net/cts/UriTest.java +++ b/tests/tests/net/src/android/net/cts/UriTest.java @@ -109,6 +109,11 @@ public class UriTest extends AndroidTestCase { uri = Uri.parse("http://localhost"); assertEquals("localhost", uri.getHost()); assertEquals(-1, uri.getPort()); + + uri = Uri.parse("http://a:a@example.com:a@example2.com/path"); + assertEquals("a:a@example.com:a@example2.com", uri.getAuthority()); + assertEquals("example2.com", uri.getHost()); + assertEquals(-1, uri.getPort()); } public void testCompareTo() { |