Class URL2Test

  • All Implemented Interfaces:
    junit.framework.Test

    public final class URL2Test
    extends junit.framework.TestCase
    URL tests imported from Android's libcore.java.net.URLTest.
    • Constructor Detail

      • URL2Test

        public URL2Test()
    • Method Detail

      • testOmittedHost

        public void testOmittedHost()
                             throws java.lang.Exception
        The serialized form of a URL includes its hash code. But the hash code is not documented. Check that we don't return a deserialized hash code from a deserialized value.
        Throws:
        java.lang.Exception
      • testNoHost

        public void testNoHost()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNoPath

        public void testNoPath()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEmptyHostAndNoPath

        public void testEmptyHostAndNoPath()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNoHostAndNoPath

        public void testNoHostAndNoPath()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testAtSignInUserInfo

        public void testAtSignInUserInfo()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUserNoPassword

        public void testUserNoPassword()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUserNoPasswordExplicitPort

        public void testUserNoPasswordExplicitPort()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUserPasswordHostPort

        public void testUserPasswordHostPort()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUserPasswordEmptyHostPort

        public void testUserPasswordEmptyHostPort()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUserPasswordEmptyHostEmptyPort

        public void testUserPasswordEmptyHostEmptyPort()
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testPathOnly

        public void testPathOnly()
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testQueryOnly

        public void testQueryOnly()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFragmentOnly

        public void testFragmentOnly()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testAtSignInPath

        public void testAtSignInPath()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testColonInPath

        public void testColonInPath()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSlashInQuery

        public void testSlashInQuery()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testQuestionMarkInQuery

        public void testQuestionMarkInQuery()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testAtSignInQuery

        public void testAtSignInQuery()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testColonInQuery

        public void testColonInQuery()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testQuestionMarkInFragment

        public void testQuestionMarkInFragment()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testColonInFragment

        public void testColonInFragment()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSlashInFragment

        public void testSlashInFragment()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testHashInFragment

        public void testHashInFragment()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEmptyPort

        public void testEmptyPort()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNonNumericPort

        public void testNonNumericPort()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNegativePort

        public void testNegativePort()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testNegativePortEqualsPlaceholder

        public void testNegativePortEqualsPlaceholder()
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativePathOnQuery

        public void testRelativePathOnQuery()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeFragmentOnQuery

        public void testRelativeFragmentOnQuery()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testPathContainsRelativeParts

        public void testPathContainsRelativeParts()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativePathAndFragment

        public void testRelativePathAndFragment()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeParentDirectory

        public void testRelativeParentDirectory()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeChildDirectory

        public void testRelativeChildDirectory()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeRootDirectory

        public void testRelativeRootDirectory()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeFullUrl

        public void testRelativeFullUrl()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeDifferentScheme

        public void testRelativeDifferentScheme()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeDifferentAuthority

        public void testRelativeDifferentAuthority()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeWithScheme

        public void testRelativeWithScheme()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRelativeFragmentOnly

        public void testRelativeFragmentOnly()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testMalformedUrlsRefusedByFirefoxAndChrome

        public void testMalformedUrlsRefusedByFirefoxAndChrome()
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRfc1808NormalExamples

        public void testRfc1808NormalExamples()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRfc1808AbnormalExampleTooManyDotDotSequences

        public void testRfc1808AbnormalExampleTooManyDotDotSequences()
                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRfc1808AbnormalExampleRemoveDotSegments

        public void testRfc1808AbnormalExampleRemoveDotSegments()
                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRfc1808AbnormalExampleNonsensicalDots

        public void testRfc1808AbnormalExampleNonsensicalDots()
                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRfc1808AbnormalExampleRelativeScheme

        public void testRfc1808AbnormalExampleRelativeScheme()
                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRfc1808AbnormalExampleQueryOrFragmentDots

        public void testRfc1808AbnormalExampleQueryOrFragmentDots()
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSquareBracketsInUserInfo

        public void testSquareBracketsInUserInfo()
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFileUrlExtraLeadingSlashes

        public void testFileUrlExtraLeadingSlashes()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFileUrlWithAuthority

        public void testFileUrlWithAuthority()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEmptyAuthority

        public void testEmptyAuthority()
                                throws java.lang.Exception
        The RI is not self-consistent on missing authorities, returning either null or the empty string depending on the number of slashes in the path. We always treat '//' as the beginning of an authority.
        Throws:
        java.lang.Exception
      • testHttpUrlExtraLeadingSlashes

        public void testHttpUrlExtraLeadingSlashes()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFileUrlRelativePath

        public void testFileUrlRelativePath()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testFileUrlDottedPath

        public void testFileUrlDottedPath()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testParsingDotAsHostname

        public void testParsingDotAsHostname()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSquareBracketsWithIPv4

        public void testSquareBracketsWithIPv4()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSquareBracketsWithHostname

        public void testSquareBracketsWithHostname()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testIPv6WithoutSquareBrackets

        public void testIPv6WithoutSquareBrackets()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testIpv6WithSquareBrackets

        public void testIpv6WithSquareBrackets()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEqualityWithNoPath

        public void testEqualityWithNoPath()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testSchemeCaseIsCanonicalized

        public void testSchemeCaseIsCanonicalized()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEmptyAuthorityWithPath

        public void testEmptyAuthorityWithPath()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEmptyAuthorityWithQuery

        public void testEmptyAuthorityWithQuery()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEmptyAuthorityWithFragment

        public void testEmptyAuthorityWithFragment()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testPartContainsSpace

        public void testPartContainsSpace()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testUnderscore

        public void testUnderscore()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception