Lines Matching refs:url
50 // guessing that it maps internally to the empty URL.
73 // Used for regular URL parse cases.
168 const char* url;
216 int length = static_cast<int>(strlen(count_cases[i].url));
220 if (length > 0 && count_cases[i].url[0] == 'f')
221 url_parse::ParseFileURL(count_cases[i].url, length, &parsed);
223 url_parse::ParseStandardURL(count_cases[i].url, length, &parsed);
236 // Regular URL with all the parts
334 const char* url = cases[i].input;
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));
369 const char* url = path_cases[i].input;
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));
425 const char* url = file_cases[i].input;
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));
460 const char* url = file_cases[i].input;
461 int len = static_cast<int>(strlen(url));
464 url_parse::ParseStandardURL(url, len, &parsed);
467 url_parse::ExtractFileName(url, parsed.path, &file_name);
469 EXPECT_TRUE(ComponentMatches(url, file_cases[i].expected, file_name));
473 // Returns true if the parameter with index |parameter| in the given URL's
476 static bool NthParameterIs(const char* url,
481 url_parse::ParseStandardURL(url, static_cast<int>(strlen(url)), &parsed);
487 if (!url_parse::ExtractQueryKeyValue(url, &query, &key, &value)) {
497 if (strncmp(&url[key.begin], expected_key, key.len) != 0)
499 if (strncmp(&url[value.begin], expected_value, value.len) != 0)
568 const char* url = mailto_cases[i].input;
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));