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 a01da8536c)
This commit is contained in:
committed by
JP Sugarbroad
parent
92849de21f
commit
36c5e0d87f
@@ -109,6 +109,11 @@ public class UriTest extends AndroidTestCase {
|
|||||||
uri = Uri.parse("http://localhost");
|
uri = Uri.parse("http://localhost");
|
||||||
assertEquals("localhost", uri.getHost());
|
assertEquals("localhost", uri.getHost());
|
||||||
assertEquals(-1, uri.getPort());
|
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() {
|
public void testCompareTo() {
|
||||||
|
|||||||
Reference in New Issue
Block a user