Index: net/http/http_pipelined_host_impl_unittest.cc |
diff --git a/net/http/http_pipelined_host_impl_unittest.cc b/net/http/http_pipelined_host_impl_unittest.cc |
index ed7d72266430abe7e79087d5e90b5b17d2531041..3eace82026f29c71992fbdfcfe3079bff04dff39 100644 |
--- a/net/http/http_pipelined_host_impl_unittest.cc |
+++ b/net/http/http_pipelined_host_impl_unittest.cc |
@@ -32,7 +32,7 @@ class MockHostDelegate : public HttpPipelinedHost::Delegate { |
MOCK_METHOD1(OnHostHasAdditionalCapacity, void(HttpPipelinedHost* host)); |
MOCK_METHOD2(OnHostDeterminedCapability, |
void(HttpPipelinedHost* host, |
- HttpPipelinedHost::Capability capability)); |
+ HttpPipelinedHostCapability capability)); |
}; |
class MockPipelineFactory : public HttpPipelinedConnection::Factory { |
@@ -83,10 +83,10 @@ class HttpPipelinedHostImplTest : public testing::Test { |
: origin_("host", 123), |
factory_(new MockPipelineFactory), // Owned by host_. |
host_(new HttpPipelinedHostImpl(&delegate_, origin_, factory_, |
- HttpPipelinedHost::CAPABLE)) { |
+ PIPELINE_CAPABLE)) { |
} |
- void SetCapability(HttpPipelinedHost::Capability capability) { |
+ void SetCapability(HttpPipelinedHostCapability capability) { |
factory_ = new MockPipelineFactory; |
host_.reset(new HttpPipelinedHostImpl( |
&delegate_, origin_, factory_, capability)); |
@@ -200,7 +200,7 @@ TEST_F(HttpPipelinedHostImplTest, PicksLeastLoadedPipeline) { |
} |
TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) { |
- SetCapability(HttpPipelinedHost::UNKNOWN); |
+ SetCapability(PIPELINE_UNKNOWN); |
MockPipeline* pipeline = AddTestPipeline(1, true, true); |
EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline()); |
@@ -219,7 +219,7 @@ TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) { |
} |
TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) { |
- SetCapability(HttpPipelinedHost::UNKNOWN); |
+ SetCapability(PIPELINE_UNKNOWN); |
MockPipeline* pipeline1 = AddTestPipeline(1, false, true); |
MockPipeline* pipeline2 = AddTestPipeline(1, true, true); |
@@ -240,15 +240,14 @@ TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) { |
} |
TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) { |
- SetCapability(HttpPipelinedHost::UNKNOWN); |
+ SetCapability(PIPELINE_UNKNOWN); |
MockPipeline* pipeline = AddTestPipeline(1, true, true); |
EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline()); |
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())) |
.Times(0); |
EXPECT_CALL(delegate_, |
- OnHostDeterminedCapability(host_.get(), |
- HttpPipelinedHost::INCAPABLE)) |
+ OnHostDeterminedCapability(host_.get(), PIPELINE_INCAPABLE)) |
.Times(1); |
host_->OnPipelineFeedback(pipeline, |
HttpPipelinedConnection::OLD_HTTP_VERSION); |
@@ -259,7 +258,7 @@ TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) { |
} |
TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) { |
- SetCapability(HttpPipelinedHost::UNKNOWN); |
+ SetCapability(PIPELINE_UNKNOWN); |
MockPipeline* pipeline = AddTestPipeline(1, true, true); |
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())) |
@@ -276,14 +275,13 @@ TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) { |
} |
TEST_F(HttpPipelinedHostImplTest, SuccessesLeadToCapable) { |
- SetCapability(HttpPipelinedHost::UNKNOWN); |
+ SetCapability(PIPELINE_UNKNOWN); |
MockPipeline* pipeline = AddTestPipeline(1, true, true); |
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())) |
.Times(1); |
EXPECT_CALL(delegate_, |
- OnHostDeterminedCapability(host_.get(), |
- HttpPipelinedHost::CAPABLE)) |
+ OnHostDeterminedCapability(host_.get(), PIPELINE_CAPABLE)) |
.Times(1); |
host_->OnPipelineFeedback(pipeline, HttpPipelinedConnection::OK); |