| 1588 | } |
| 1589 | |
| 1590 | static void TlsProtocolRequest(int port, const char* expected_protocol) |
| 1591 | { |
| 1592 | ASSERT_NE(-1, port); |
| 1593 | |
| 1594 | char url[128]; |
| 1595 | MakeLocalUrl(url, sizeof(url), true, port); |
| 1596 | |
| 1597 | DirectRequestHelper helper(url); |
| 1598 | ASSERT_TRUE(helper.IsValid()); |
| 1599 | |
| 1600 | dmHttpClient::Result r = helper.Get("/tls-info"); |
| 1601 | ASSERT_EQ(dmHttpClient::RESULT_OK, r); |
| 1602 | ASSERT_EQ(200, helper.m_StatusCode); |
| 1603 | ASSERT_STREQ(expected_protocol, helper.m_Content.c_str()); |
| 1604 | |
| 1605 | r = helper.Get("/add/10/20"); |
| 1606 | ASSERT_EQ(dmHttpClient::RESULT_OK, r); |
| 1607 | ASSERT_EQ(200, helper.m_StatusCode); |
| 1608 | ASSERT_EQ(30, strtol(helper.m_Content.c_str(), 0, 10)); |
| 1609 | } |
| 1610 | |
| 1611 | static void TlsProtocolRequestOrDarwinUnsupported(int port, const char* expected_protocol) |
| 1612 | { |
no test coverage detected