Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1991)

Unified Diff: net/http/http_basic_state_unittest.cc

Issue 2297263002: Revert "Only allow HTTP/0.9 support on default ports." (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_basic_state.cc ('k') | net/http/http_basic_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_basic_state_unittest.cc
diff --git a/net/http/http_basic_state_unittest.cc b/net/http/http_basic_state_unittest.cc
index cf0fcde0f7075df761e9461085465f0f3025fbf0..1d9476da23cafa1e1b114f0373032e5bbd98c1eb 100644
--- a/net/http/http_basic_state_unittest.cc
+++ b/net/http/http_basic_state_unittest.cc
@@ -17,25 +17,20 @@ namespace {
TEST(HttpBasicStateTest, ConstructsProperly) {
ClientSocketHandle* const handle = new ClientSocketHandle;
// Ownership of |handle| is passed to |state|.
- const HttpBasicState state(base::WrapUnique(handle), true /* using_proxy */,
- false /* http_09_on_non_default_ports_enabled */);
+ const HttpBasicState state(base::WrapUnique(handle), true);
EXPECT_EQ(handle, state.connection());
EXPECT_TRUE(state.using_proxy());
- EXPECT_FALSE(state.http_09_on_non_default_ports_enabled());
}
-TEST(HttpBasicStateTest, ConstructsProperlyWithDifferentOptions) {
- const HttpBasicState state(base::MakeUnique<ClientSocketHandle>(),
- false /* using_proxy */,
- true /* http_09_on_non_default_ports_enabled */);
+TEST(HttpBasicStateTest, UsingProxyCanBeFalse) {
+ const HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false);
EXPECT_FALSE(state.using_proxy());
- EXPECT_TRUE(state.http_09_on_non_default_ports_enabled());
}
TEST(HttpBasicStateTest, ReleaseConnectionWorks) {
ClientSocketHandle* const handle = new ClientSocketHandle;
// Ownership of |handle| is passed to |state|.
- HttpBasicState state(base::WrapUnique(handle), false, false);
+ HttpBasicState state(base::WrapUnique(handle), false);
const std::unique_ptr<ClientSocketHandle> released_connection(
state.ReleaseConnection());
EXPECT_EQ(NULL, state.connection());
@@ -43,7 +38,7 @@ TEST(HttpBasicStateTest, ReleaseConnectionWorks) {
}
TEST(HttpBasicStateTest, InitializeWorks) {
- HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false, false);
+ HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false);
const HttpRequestInfo request_info;
EXPECT_EQ(OK,
state.Initialize(
@@ -52,7 +47,7 @@ TEST(HttpBasicStateTest, InitializeWorks) {
}
TEST(HttpBasicStateTest, DeleteParser) {
- HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false, false);
+ HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false);
const HttpRequestInfo request_info;
state.Initialize(&request_info, LOW, BoundNetLog(), CompletionCallback());
EXPECT_TRUE(state.parser());
@@ -62,8 +57,7 @@ TEST(HttpBasicStateTest, DeleteParser) {
TEST(HttpBasicStateTest, GenerateRequestLineNoProxy) {
const bool use_proxy = false;
- HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), use_proxy,
- false);
+ HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), use_proxy);
HttpRequestInfo request_info;
request_info.url = GURL("http://www.example.com/path?foo=bar#hoge");
request_info.method = "PUT";
@@ -73,8 +67,7 @@ TEST(HttpBasicStateTest, GenerateRequestLineNoProxy) {
TEST(HttpBasicStateTest, GenerateRequestLineWithProxy) {
const bool use_proxy = true;
- HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), use_proxy,
- false);
+ HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), use_proxy);
HttpRequestInfo request_info;
request_info.url = GURL("http://www.example.com/path?foo=bar#hoge");
request_info.method = "PUT";
« no previous file with comments | « net/http/http_basic_state.cc ('k') | net/http/http_basic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698