Loading core/tests/coretests/src/android/net/UriTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,7 @@ public class UriTest extends TestCase { assertEquals("d", uri.getQueryParameter("c")); } // http://b/2337042 @SmallTest public void testHostWithTrailingDot() { Uri uri = Uri.parse("http://google.com./b/c/g"); Loading core/tests/coretests/src/android/net/WebAddressTest.java +9 −0 Original line number Diff line number Diff line Loading @@ -22,10 +22,19 @@ import junit.framework.TestCase; public class WebAddressTest extends TestCase { // http://b/2337042 @SmallTest public void testHostWithTrailingDot() { WebAddress webAddress = new WebAddress("http://google.com./b/c/g"); assertEquals("google.com.", webAddress.mHost); assertEquals("/b/c/g", webAddress.mPath); } // http://b/1011602 @SmallTest public void testPathWithoutLeadingSlash() { WebAddress webAddress = new WebAddress("http://www.myspace.com?si=1"); assertEquals("www.myspace.com", webAddress.mHost); assertEquals("/?si=1", webAddress.mPath); } } Loading
core/tests/coretests/src/android/net/UriTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,7 @@ public class UriTest extends TestCase { assertEquals("d", uri.getQueryParameter("c")); } // http://b/2337042 @SmallTest public void testHostWithTrailingDot() { Uri uri = Uri.parse("http://google.com./b/c/g"); Loading
core/tests/coretests/src/android/net/WebAddressTest.java +9 −0 Original line number Diff line number Diff line Loading @@ -22,10 +22,19 @@ import junit.framework.TestCase; public class WebAddressTest extends TestCase { // http://b/2337042 @SmallTest public void testHostWithTrailingDot() { WebAddress webAddress = new WebAddress("http://google.com./b/c/g"); assertEquals("google.com.", webAddress.mHost); assertEquals("/b/c/g", webAddress.mPath); } // http://b/1011602 @SmallTest public void testPathWithoutLeadingSlash() { WebAddress webAddress = new WebAddress("http://www.myspace.com?si=1"); assertEquals("www.myspace.com", webAddress.mHost); assertEquals("/?si=1", webAddress.mPath); } }