summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Vartanian <flooey@google.com>2017-11-07 13:56:04 +0000
committerJP Sugarbroad <jpsugar@google.com>2018-01-11 15:18:47 -0800
commitff97586f14281559530932a1486e1446a547cda6 (patch)
tree92f769389c79c2aed84c2275af4c6ff4fade2555
parenta061dcc3b8191d2ce619d3c3e70227b2215ffe9e (diff)
downloadcts-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.java5
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() {