Lines Matching refs:Parsed
134 // Parsed ----------------------------------------------------------------------
158 url_parse::Parsed parsed;
159 url_parse::ParseStandardURL(length_cases[i], true_length, &parsed);
161 EXPECT_EQ(true_length, parsed.Length());
169 Parsed::ComponentType component;
176 {"http://u:p@h:8/p?q#r", Parsed::SCHEME, true, 0},
177 {"http://u:p@h:8/p?q#r", Parsed::SCHEME, false, 0},
178 {"http://u:p@h:8/p?q#r", Parsed::USERNAME, true, 7},
179 {"http://u:p@h:8/p?q#r", Parsed::USERNAME, false, 7},
180 {"http://u:p@h:8/p?q#r", Parsed::PASSWORD, true, 9},
181 {"http://u:p@h:8/p?q#r", Parsed::PASSWORD, false, 9},
182 {"http://u:p@h:8/p?q#r", Parsed::HOST, true, 11},
183 {"http://u:p@h:8/p?q#r", Parsed::HOST, false, 11},
184 {"http://u:p@h:8/p?q#r", Parsed::PORT, true, 12},
185 {"http://u:p@h:8/p?q#r", Parsed::PORT, false, 13},
186 {"http://u:p@h:8/p?q#r", Parsed::PATH, false, 14},
187 {"http://u:p@h:8/p?q#r", Parsed::PATH, true, 14},
188 {"http://u:p@h:8/p?q#r", Parsed::QUERY, true, 16},
189 {"http://u:p@h:8/p?q#r", Parsed::QUERY, false, 17},
190 {"http://u:p@h:8/p?q#r", Parsed::REF, true, 18},
191 {"http://u:p@h:8/p?q#r", Parsed::REF, false, 19},
193 {"http://u:p@h:8/p?", Parsed::REF, true, 17},
194 {"http://u:p@h:8/p?q", Parsed::REF, true, 18},
195 {"http://u:p@h:8/p#r", Parsed::QUERY, true, 16},
196 {"http://u:p@h:8#r", Parsed::PATH, true, 14},
197 {"http://u:p@h/", Parsed::PORT, true, 12},
198 {"http://u:p@/", Parsed::HOST, true, 11},
203 {"http://u@h/", Parsed::PASSWORD, true, 9},
204 {"http://h/", Parsed::USERNAME, true, 7},
205 {"http:", Parsed::USERNAME, true, 5},
206 {"", Parsed::SCHEME, true, 0},
208 {"", Parsed::REF, true, 0},
210 {"file:///c:/foo", Parsed::USERNAME, true, 7},
211 {"file:///c:/foo", Parsed::PASSWORD, true, 7},
212 {"file:///c:/foo", Parsed::HOST, true, 7},
213 {"file:///c:/foo", Parsed::PATH, true, 7},
219 url_parse::Parsed parsed;
221 url_parse::ParseFileURL(count_cases[i].url, length, &parsed);
223 url_parse::ParseStandardURL(count_cases[i].url, length, &parsed);
225 int chars_before = parsed.CountCharactersBefore(
332 url_parse::Parsed parsed;
335 url_parse::ParseStandardURL(url, static_cast<int>(strlen(url)), &parsed);
336 int port = url_parse::ParsePort(url, parsed.port);
338 EXPECT_TRUE(ComponentMatches(url, cases[i].scheme, parsed.scheme));
339 EXPECT_TRUE(ComponentMatches(url, cases[i].username, parsed.username));
340 EXPECT_TRUE(ComponentMatches(url, cases[i].password, parsed.password));
341 EXPECT_TRUE(ComponentMatches(url, cases[i].host, parsed.host));
343 EXPECT_TRUE(ComponentMatches(url, cases[i].path, parsed.path));
344 EXPECT_TRUE(ComponentMatches(url, cases[i].query, parsed.query));
345 EXPECT_TRUE(ComponentMatches(url, cases[i].ref, parsed.ref));
367 url_parse::Parsed parsed;
370 url_parse::ParsePathURL(url, static_cast<int>(strlen(url)), &parsed);
372 EXPECT_TRUE(ComponentMatches(url, path_cases[i].scheme, parsed.scheme));
373 EXPECT_TRUE(ComponentMatches(url, path_cases[i].path, parsed.path));
376 ExpectInvalidComponent(parsed.username);
377 ExpectInvalidComponent(parsed.password);
378 ExpectInvalidComponent(parsed.host);
379 ExpectInvalidComponent(parsed.port);
380 ExpectInvalidComponent(parsed.query);
381 ExpectInvalidComponent(parsed.ref);
423 url_parse::Parsed parsed;
426 url_parse::ParseFileURL(url, static_cast<int>(strlen(url)), &parsed);
427 int port = url_parse::ParsePort(url, parsed.port);
429 EXPECT_TRUE(ComponentMatches(url, file_cases[i].scheme, parsed.scheme));
430 EXPECT_TRUE(ComponentMatches(url, file_cases[i].username, parsed.username));
431 EXPECT_TRUE(ComponentMatches(url, file_cases[i].password, parsed.password));
432 EXPECT_TRUE(ComponentMatches(url, file_cases[i].host, parsed.host));
434 EXPECT_TRUE(ComponentMatches(url, file_cases[i].path, parsed.path));
435 EXPECT_TRUE(ComponentMatches(url, file_cases[i].query, parsed.query));
436 EXPECT_TRUE(ComponentMatches(url, file_cases[i].ref, parsed.ref));
463 url_parse::Parsed parsed;
464 url_parse::ParseStandardURL(url, len, &parsed);
467 url_parse::ExtractFileName(url, parsed.path, &file_name);
480 url_parse::Parsed parsed;
481 url_parse::ParseStandardURL(url, static_cast<int>(strlen(url)), &parsed);
483 url_parse::Component query = parsed.query;
566 url_parse::Parsed parsed;
569 url_parse::ParseMailtoURL(url, static_cast<int>(strlen(url)), &parsed);
570 int port = url_parse::ParsePort(url, parsed.port);
572 EXPECT_TRUE(ComponentMatches(url, mailto_cases[i].scheme, parsed.scheme));
573 EXPECT_TRUE(ComponentMatches(url, mailto_cases[i].path, parsed.path));
574 EXPECT_TRUE(ComponentMatches(url, mailto_cases[i].query, parsed.query));
578 ExpectInvalidComponent(parsed.username);
579 ExpectInvalidComponent(parsed.password);
580 ExpectInvalidComponent(parsed.port);
581 ExpectInvalidComponent(parsed.ref);