tests/ceftests/parser_unittest.cc
// Create the URL using scheme, host, path, query and Fragment
Create the URL using scheme, host, path, query and Fragment
Create the URL using scheme host path query and Fragment
TEST(ParserTest, CreateURLSchemeHostPathQueryFragment) {
  CefURLParts parts;
  CefString url;
  CefString(&parts.scheme).FromASCII("http");
  CefString(&parts.host).FromASCII("www.example.com");
  CefString(&parts.path).FromASCII("/path/to.html");
  CefString(&parts.query).FromASCII("foo=test&bar=test2");
  CefString(&parts.fragment).FromASCII("ref");
  EXPECT_TRUE(CefCreateURL(parts, url));
  EXPECT_STREQ("http://www.example.com/path/to.html?foo=test&bar=test2#ref",
               url.ToString().c_str());
}
TEST ( ParserTest , CreateURLSchemeHostPathQueryFragment ) { CefURLParts parts ; CefString url ; CefString ( & parts . scheme ) . FromASCII ( " " ) ; CefString ( & parts . host ) . FromASCII ( " " ) ; CefString ( & parts . path ) . FromASCII ( " " ) ; CefString ( & parts . query ) . FromASCII ( " " ) ; CefString ( & parts . fragment ) . FromASCII ( " " ) ; EXPECT_TRUE ( CefCreateURL ( parts , url ) ) ; EXPECT_STREQ ( " " , url . ToString ( ) . c_str ( ) ) ; }
Create the URL using scheme, host, path, query and Fragment
Create the URL using scheme host path query and Fragment