Home | History | Annotate | Download | only in url

Lines Matching full:gurl

6 #include "url/gurl.h"
40 GURL gurl(src);
41 return gurl.possibly_invalid_spec();
69 // Test the basic creation and querying of components in a GURL. We assume
73 GURL url(WStringToUTF16(L"http://user:pass@google.com:99/foo;bar?q=a#ref"));
92 GURL url_special_pass("http://user:%40!$&'()*+,;=:@google.com:12345");
94 // GURL canonicalizes some delimiters.
101 GURL url;
117 GURL url(WStringToUTF16(L"http://user:pass@google.com:99/foo;bar?q=a#ref"));
119 GURL url2(url);
134 GURL invalid;
135 GURL invalid2(invalid);
150 GURL url(WStringToUTF16(L"http://user:pass@google.com:99/foo;bar?q=a#ref"));
152 GURL url2;
168 GURL invalid;
169 GURL invalid2;
186 GURL a("filesystem:http://example.com/temporary/");
192 GURL url(WStringToUTF16(L"filesystem:https://user:pass@google.com:99/t/foo;bar?q=a#ref"));
194 GURL url2(url);
208 const GURL* inner = url2.inner_url();
236 EXPECT_TRUE(GURL(valid_cases[i]).is_valid())
248 EXPECT_FALSE(GURL(invalid_cases[i]).is_valid())
255 // two slashes, GURL intentionally just ignores slashes more than 2 and parses
257 GURL url("http:///host");
264 GURL url("http:google.com:foo");
281 // canonicalizer unit test. Here, we just test that the GURL integration
304 GURL input(resolve_cases[i].base);
305 GURL output = input.Resolve(resolve_cases[i].relative);
311 GURL inputw(ConvertUTF8ToUTF16(resolve_cases[i].base));
312 GURL outputw =
335 GURL url(cases[i].input);
336 GURL origin = url.GetOrigin();
354 GURL url(cases[i].input);
355 GURL origin = url.GetAsReferrer();
373 GURL url(cases[i].input);
374 GURL empty_path = url.GetWithEmptyPath();
406 GURL url(cur.base);
407 GURL::Replacements repl;
408 SetupReplacement(&GURL::Replacements::SetScheme, &repl, cur.scheme);
409 SetupReplacement(&GURL::Replacements::SetUsername, &repl, cur.username);
410 SetupReplacement(&GURL::Replacements::SetPassword, &repl, cur.password);
411 SetupReplacement(&GURL::Replacements::SetHost, &repl, cur.host);
412 SetupReplacement(&GURL::Replacements::SetPort, &repl, cur.port);
413 SetupReplacement(&GURL::Replacements::SetPath, &repl, cur.path);
414 SetupReplacement(&GURL::Replacements::SetQuery, &repl, cur.query);
415 SetupReplacement(&GURL::Replacements::SetRef, &repl, cur.ref);
416 GURL output = url.ReplaceComponents(repl);
426 // the Parsed importing validation DCHECK in GURL.
427 GURL url(" data: one ? two # three ");
431 GURL::Replacements repl;
433 GURL url_no_ref = url.ReplaceComponents(repl);
439 GURL import_url(url_no_ref.spec(),
462 GURL url(cases[i].input);
510 GURL url(port_tests[i].spec);
531 GURL url(ip_tests[i].spec);
556 GURL url(cases[i].input);
565 GURL url_1("http://www.google.com:99/foo");
568 GURL url_2("http://google.com:99/foo");
571 GURL url_3("http://google.com./foo");
574 GURL url_4("http://google.com/foo");
577 GURL url_5("http://google.com./foo");
580 GURL url_6("http://www.google.com./foo");
583 GURL url_7("http://www.balabala.com/foo");
586 GURL url_8("http://www.google.com.cn/foo");
589 GURL url_9("http://www.iamnotgoogle.com/foo");
592 GURL url_10("http://www.iamnotgoogle.com../foo");
595 GURL url_11("filesystem:http://www.google.com:99/foo/");
598 GURL url_12("filesystem:http://www.iamnotgoogle.com/foo/");
605 GURL url_1(" \t ht\ntp://\twww.goo\rgle.com/as\ndf \n ");
609 GURL url_2 = url_1.Resolve(" \n /fo\to\r ");
616 GURL a("http:foo/bar");
619 GURL b("foo:bar/baz");
622 GURL c("foo://bar/baz");
627 EXPECT_TRUE(GURL("http://bar/").SchemeIsHTTPOrHTTPS());
628 EXPECT_TRUE(GURL("HTTPS://BAR").SchemeIsHTTPOrHTTPS());
629 EXPECT_FALSE(GURL("ftp://bar/").SchemeIsHTTPOrHTTPS());
633 EXPECT_TRUE(GURL("WS://BAR/").SchemeIsWSOrWSS());
634 EXPECT_TRUE(GURL("wss://bar/").SchemeIsWSOrWSS());
635 EXPECT_FALSE(GURL("http://bar/").SchemeIsWSOrWSS());
639 EXPECT_TRUE(GURL("BLOB://BAR/").SchemeIsBlob());
640 EXPECT_TRUE(GURL("blob://bar/").SchemeIsBlob());
641 EXPECT_FALSE(GURL("http://bar/").SchemeIsBlob());