Lines Matching refs:cases
64 // Test the cases where we should be the same as WebKit's old KURL.
78 } cases[] = {
86 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
88 WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url);
90 EXPECT_EQ(cases[i].protocol, kurl.protocol());
91 EXPECT_EQ(cases[i].host, kurl.host());
92 EXPECT_EQ(cases[i].port, kurl.port());
93 EXPECT_EQ(cases[i].user, kurl.user());
94 EXPECT_EQ(cases[i].pass, kurl.pass());
95 EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent());
96 EXPECT_EQ(cases[i].query, kurl.query());
97 EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier());
98 EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier());
101 WTF::String utf16(cases[i].url);
104 EXPECT_EQ(cases[i].protocol, kurl.protocol());
105 EXPECT_EQ(cases[i].host, kurl.host());
106 EXPECT_EQ(cases[i].port, kurl.port());
107 EXPECT_EQ(cases[i].user, kurl.user());
108 EXPECT_EQ(cases[i].pass, kurl.pass());
109 EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent());
110 EXPECT_EQ(cases[i].query, kurl.query());
111 EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier());
112 EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier());
116 // Test a few cases where we're different just to make sure we give reasonable
120 ComponentCase cases[] = {
138 for (size_t i = 0; i < arraysize(cases); i++) {
139 WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url);
141 EXPECT_EQ(cases[i].protocol, kurl.protocol());
142 EXPECT_EQ(cases[i].host, kurl.host());
143 EXPECT_EQ(cases[i].port, kurl.port());
144 EXPECT_EQ(cases[i].user, kurl.user());
145 EXPECT_EQ(cases[i].pass, kurl.pass());
146 EXPECT_EQ(cases[i].lastPath, kurl.lastPathComponent());
147 EXPECT_EQ(cases[i].query, kurl.query());
149 if (cases[i].ref)
150 EXPECT_EQ(WTF::String::fromUTF8(cases[i].ref), kurl.fragmentIdentifier());
213 } cases[] = {
236 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
237 WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url);
239 kurl.setProtocol(cases[i].protocol);
240 EXPECT_STREQ(cases[i].expectedProtocol, kurl.string().utf8().data());
242 kurl.setHost(cases[i].host);
243 EXPECT_STREQ(cases[i].expectedHost, kurl.string().utf8().data());
245 kurl.setPort(cases[i].port);
246 EXPECT_STREQ(cases[i].expectedPort, kurl.string().utf8().data());
248 kurl.setUser(cases[i].user);
249 EXPECT_STREQ(cases[i].expectedUser, kurl.string().utf8().data());
251 kurl.setPass(cases[i].pass);
252 EXPECT_STREQ(cases[i].expectedPass, kurl.string().utf8().data());
254 kurl.setPath(cases[i].path);
255 EXPECT_STREQ(cases[i].expectedPath, kurl.string().utf8().data());
257 kurl.setQuery(cases[i].query);
258 EXPECT_STREQ(cases[i].expectedQuery, kurl.string().utf8().data());
319 // more), so we only bother to test a few cases.