tests/ceftests/parser_unittest.cc
TEST(ParserTest, CreateURLAll) {
  CefURLParts parts;
  CefString url;
  CefString(&parts.scheme).FromASCII("http");
  CefString(&parts.username).FromASCII("user");
  CefString(&parts.password).FromASCII("pass");
  CefString(&parts.host).FromASCII("www.example.com");
  CefString(&parts.port).FromASCII("88");
  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://user:pass@www.example.com:88/path/to.html?foo=test&bar=test2#ref",
      url.ToString().c_str());
}
// Create the URL using all the various components.
Create the URL using all the various components.
Create the URL using all the various components .
TEST(ParserTest, CreateURLAll) {
  CefURLParts parts;
  CefString url;
  CefString(&parts.scheme).FromASCII("http");
  CefString(&parts.username).FromASCII("user");
  CefString(&parts.password).FromASCII("pass");
  CefString(&parts.host).FromASCII("www.example.com");
  CefString(&parts.port).FromASCII("88");
  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://user:pass@www.example.com:88/path/to.html?foo=test&bar=test2#ref",
      url.ToString().c_str());
}
TEST ( ParserTest , CreateURLAll ) { CefURLParts parts ; CefString url ; CefString ( & parts . scheme ) . FromASCII ( " " ) ; CefString ( & parts . username ) . FromASCII ( " " ) ; CefString ( & parts . password ) . FromASCII ( " " ) ; CefString ( & parts . host ) . FromASCII ( " " ) ; CefString ( & parts . port ) . 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 all the various components.
Create the URL using all the various components .