Lines Matching refs:url
66 BUrl url("http:"); in TestIsValid() local
68 !url.IsValid()); in TestIsValid()
70 url.SetHost("<invalid>"); in TestIsValid()
71 CPPUNIT_ASSERT_MESSAGE("Set to an invalid host", !url.IsValid()); in TestIsValid()
73 url.SetUrlString(""); in TestIsValid()
74 url.SetProtocol("\t \n"); in TestIsValid()
75 CPPUNIT_ASSERT_MESSAGE("Set a protocol with whitespace", !url.IsValid()); in TestIsValid()
76 url.SetProtocol("123"); in TestIsValid()
77 CPPUNIT_ASSERT_MESSAGE("Set an all-digits protocol", !url.IsValid()); in TestIsValid()
79 url.SetUserName("user"); in TestIsValid()
81 !url.IsValid()); in TestIsValid()
82 url.SetPassword("pass"); in TestIsValid()
84 !url.IsValid()); in TestIsValid()
86 url.SetProtocol("http"); in TestIsValid()
87 url.SetFragment("fragment"); in TestIsValid()
89 !url.IsValid()); in TestIsValid()
90 url.SetFragment("fragment"); in TestIsValid()
91 url.SetProtocol("http"); in TestIsValid()
93 !url.IsValid()); in TestIsValid()
99 BUrl url; in TestGettersSetters() local
100 url.SetProtocol("http"); in TestGettersSetters()
101 url.SetUserName("user"); in TestGettersSetters()
102 url.SetPassword("password"); in TestGettersSetters()
103 url.SetHost("example.com"); in TestGettersSetters()
104 url.SetPort(8080); in TestGettersSetters()
105 url.SetPath("/path"); in TestGettersSetters()
106 url.SetRequest("query=value"); in TestGettersSetters()
107 url.SetFragment("fragment"); in TestGettersSetters()
109 CPPUNIT_ASSERT_EQUAL(BString("http"), url.Protocol()); in TestGettersSetters()
110 CPPUNIT_ASSERT_EQUAL(BString("user"), url.UserName()); in TestGettersSetters()
111 CPPUNIT_ASSERT_EQUAL(BString("password"), url.Password()); in TestGettersSetters()
112 CPPUNIT_ASSERT_EQUAL(BString("user:password"), url.UserInfo()); in TestGettersSetters()
113 CPPUNIT_ASSERT_EQUAL(BString("example.com"), url.Host()); in TestGettersSetters()
115 url.Authority()); in TestGettersSetters()
116 CPPUNIT_ASSERT_EQUAL(8080, url.Port()); in TestGettersSetters()
117 CPPUNIT_ASSERT_EQUAL(BString("/path"), url.Path()); in TestGettersSetters()
118 CPPUNIT_ASSERT_EQUAL(BString("query=value"), url.Request()); in TestGettersSetters()
119 CPPUNIT_ASSERT_EQUAL(BString("fragment"), url.Fragment()); in TestGettersSetters()
122 url.UrlString()); in TestGettersSetters()
128 BUrl url; in TestNullity() local
129 url.SetProtocol("http"); in TestNullity()
130 url.SetHost("example.com"); in TestNullity()
132 CPPUNIT_ASSERT(url.HasAuthority()); in TestNullity()
133 CPPUNIT_ASSERT(url.HasHost()); in TestNullity()
135 CPPUNIT_ASSERT(!url.HasUserName()); in TestNullity()
136 CPPUNIT_ASSERT(!url.HasPassword()); in TestNullity()
137 CPPUNIT_ASSERT(!url.HasUserInfo()); in TestNullity()
138 CPPUNIT_ASSERT(!url.HasPort()); in TestNullity()
139 CPPUNIT_ASSERT(!url.HasPath()); in TestNullity()
140 CPPUNIT_ASSERT(!url.HasRequest()); in TestNullity()
141 CPPUNIT_ASSERT(!url.HasFragment()); in TestNullity()
161 const char* url; member
218 testUrl.SetUrlString(kTestExplode[testIndex].url); in ExplodeImplodeTest()
220 CPPUNIT_ASSERT_EQUAL(BString(kTestExplode[testIndex].url), in ExplodeImplodeTest()
599 BUrl url(tests[i].escaped); in IDNTest() local
600 url.UrlDecode(); in IDNTest()
606 CPPUNIT_ASSERT_EQUAL(url.UrlString(), idn.UrlString()); in IDNTest()