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

Unified Diff: net/http/http_pipelined_host_impl_unittest.cc

Issue 8833003: Revert 113315 (speculative revert for http://crbug.com/106657) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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_pipelined_host_impl.cc ('k') | net/http/http_pipelined_host_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_pipelined_host_impl_unittest.cc
===================================================================
--- net/http/http_pipelined_host_impl_unittest.cc (revision 113337)
+++ net/http/http_pipelined_host_impl_unittest.cc (working copy)
@@ -32,7 +32,7 @@
MOCK_METHOD1(OnHostHasAdditionalCapacity, void(HttpPipelinedHost* host));
MOCK_METHOD2(OnHostDeterminedCapability,
void(HttpPipelinedHost* host,
- HttpPipelinedHostCapability capability));
+ HttpPipelinedHost::Capability capability));
};
class MockPipelineFactory : public HttpPipelinedConnection::Factory {
@@ -83,10 +83,10 @@
: origin_("host", 123),
factory_(new MockPipelineFactory), // Owned by host_.
host_(new HttpPipelinedHostImpl(&delegate_, origin_, factory_,
- PIPELINE_CAPABLE)) {
+ HttpPipelinedHost::CAPABLE)) {
}
- void SetCapability(HttpPipelinedHostCapability capability) {
+ void SetCapability(HttpPipelinedHost::Capability capability) {
factory_ = new MockPipelineFactory;
host_.reset(new HttpPipelinedHostImpl(
&delegate_, origin_, factory_, capability));
@@ -200,7 +200,7 @@
}
TEST_F(HttpPipelinedHostImplTest, OpensUpOnPipelineSuccess) {
- SetCapability(PIPELINE_UNKNOWN);
+ SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline());
@@ -219,7 +219,7 @@
}
TEST_F(HttpPipelinedHostImplTest, OpensAllPipelinesOnPipelineSuccess) {
- SetCapability(PIPELINE_UNKNOWN);
+ SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline1 = AddTestPipeline(1, false, true);
MockPipeline* pipeline2 = AddTestPipeline(1, true, true);
@@ -240,14 +240,15 @@
}
TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) {
- SetCapability(PIPELINE_UNKNOWN);
+ SetCapability(HttpPipelinedHost::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(), PIPELINE_INCAPABLE))
+ OnHostDeterminedCapability(host_.get(),
+ HttpPipelinedHost::INCAPABLE))
.Times(1);
host_->OnPipelineFeedback(pipeline,
HttpPipelinedConnection::OLD_HTTP_VERSION);
@@ -258,7 +259,7 @@
}
TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) {
- SetCapability(PIPELINE_UNKNOWN);
+ SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
@@ -275,13 +276,14 @@
}
TEST_F(HttpPipelinedHostImplTest, SuccessesLeadToCapable) {
- SetCapability(PIPELINE_UNKNOWN);
+ SetCapability(HttpPipelinedHost::UNKNOWN);
MockPipeline* pipeline = AddTestPipeline(1, true, true);
EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
.Times(1);
EXPECT_CALL(delegate_,
- OnHostDeterminedCapability(host_.get(), PIPELINE_CAPABLE))
+ OnHostDeterminedCapability(host_.get(),
+ HttpPipelinedHost::CAPABLE))
.Times(1);
host_->OnPipelineFeedback(pipeline, HttpPipelinedConnection::OK);
« no previous file with comments | « net/http/http_pipelined_host_impl.cc ('k') | net/http/http_pipelined_host_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698