Source release 16.2.0

This commit is contained in:
John W. Bruce
2020-04-10 16:13:07 -07:00
parent 1ff9f8588a
commit b830b1d1fb
883 changed files with 509706 additions and 143739 deletions

View File

@@ -25,7 +25,7 @@ std::string gTestData("Hello");
// Arbitrary buffer size and timeout settings.
const int kHttpBufferSize = 4096;
const int kTimeout = 3000;
}
} // namespace
class HttpSocketTest : public testing::Test {
public:
@@ -108,62 +108,62 @@ struct ParseUrlTests {
ParseUrlTests parse_url_tests[] = {
{
"https://code.google.com/p/googletest/wiki/Primer", // url
"https", // scheme
true, // secure_connect
"code.google.com", // domain_name
"443", // port
"/p/googletest/wiki/Primer", // path
"https://code.google.com/p/googletest/wiki/Primer", // url
"https", // scheme
true, // secure_connect
"code.google.com", // domain_name
"443", // port
"/p/googletest/wiki/Primer", // path
},
{
"http://code.google.com/p/googletest/wiki/Primer/", // url
"http", // scheme
false, // secure_connect
"code.google.com", // domain_name
"80", // port
"/p/googletest/wiki/Primer/", // path
"http://code.google.com/p/googletest/wiki/Primer/", // url
"http", // scheme
false, // secure_connect
"code.google.com", // domain_name
"80", // port
"/p/googletest/wiki/Primer/", // path
},
{
"http://code.google.com/", // url
"http", // scheme
false, // secure_connect
"code.google.com", // domain_name
"80", // port
"/", // path
"http://code.google.com/", // url
"http", // scheme
false, // secure_connect
"code.google.com", // domain_name
"80", // port
"/", // path
},
{
"http://code.google.com", // url
"http", // scheme
false, // secure_connect
"code.google.com", // domain_name
"80", // port
"/", // path
"http://code.google.com", // url
"http", // scheme
false, // secure_connect
"code.google.com", // domain_name
"80", // port
"/", // path
},
{
"http://10.11.12.13:8888/drm", // url
"http", // scheme
false, // secure_connect
"10.11.12.13", // domain_name
"8888", // port
"/drm", // path
"http://10.11.12.13:8888/drm", // url
"http", // scheme
false, // secure_connect
"10.11.12.13", // domain_name
"8888", // port
"/drm", // path
},
{
"http://10.11.12.13:8888", // url
"http", // scheme
false, // secure_connect
"10.11.12.13", // domain_name
"8888", // port
"/", // path
"http://10.11.12.13:8888", // url
"http", // scheme
false, // secure_connect
"10.11.12.13", // domain_name
"8888", // port
"/", // path
},
{
"https://10.11.12.13:8888", // url
"https", // scheme
true, // secure_connect
"10.11.12.13", // domain_name
"8888", // port
"/", // path
"https://10.11.12.13:8888", // url
"https", // scheme
true, // secure_connect
"10.11.12.13", // domain_name
"8888", // port
"/", // path
},
{NULL, NULL, false, NULL, 0, NULL} // list terminator
{nullptr, nullptr, false, nullptr, 0, nullptr} // list terminator
};
TEST_F(HttpSocketTest, ParseUrlTest) {
@@ -172,9 +172,9 @@ TEST_F(HttpSocketTest, ParseUrlTest) {
std::string domain_name;
std::string port;
std::string path;
ParseUrlTests* test = NULL;
ParseUrlTests* test = nullptr;
for (test = &parse_url_tests[0]; test->url != NULL; ++test) {
for (test = &parse_url_tests[0]; test->url != nullptr; ++test) {
bool ok = HttpSocket::ParseUrl(test->url, &scheme, &secure_connect,
&domain_name, &port, &path);
EXPECT_TRUE(ok);