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

Unified Diff: net/http/http_pipelined_host_forced_unittest.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: net/http/http_pipelined_host_forced_unittest.cc
diff --git a/net/http/http_pipelined_host_forced_unittest.cc b/net/http/http_pipelined_host_forced_unittest.cc
index b86dd96d50abbef2b70f2922c7b5650929019840..fe9ea874c852d2c7782b11d71374896a96fcdcfd 100644
--- a/net/http/http_pipelined_host_forced_unittest.cc
+++ b/net/http/http_pipelined_host_forced_unittest.cc
@@ -20,32 +20,37 @@ namespace net {
namespace {
-HttpPipelinedStream* kDummyStream =
- reinterpret_cast<HttpPipelinedStream*>(24);
+HttpPipelinedStream* kDummyStream = reinterpret_cast<HttpPipelinedStream*>(24);
class HttpPipelinedHostForcedTest : public testing::Test {
public:
HttpPipelinedHostForcedTest()
: key_(HostPortPair("host", 123)),
factory_(new MockPipelineFactory), // Owned by |host_|.
- host_(new HttpPipelinedHostForced(&delegate_, key_, factory_)) {
- }
+ host_(new HttpPipelinedHostForced(&delegate_, key_, factory_)) {}
MockPipeline* AddTestPipeline() {
MockPipeline* pipeline = new MockPipeline(0, true, true);
- EXPECT_CALL(*factory_, CreateNewPipeline(&connection_, host_.get(),
- MatchesOrigin(key_.origin()),
- Ref(ssl_config_), Ref(proxy_info_),
- Ref(net_log_), true,
- kProtoSPDY3))
+ EXPECT_CALL(*factory_,
+ CreateNewPipeline(&connection_,
+ host_.get(),
+ MatchesOrigin(key_.origin()),
+ Ref(ssl_config_),
+ Ref(proxy_info_),
+ Ref(net_log_),
+ true,
+ kProtoSPDY3))
.Times(1)
.WillOnce(Return(pipeline));
- EXPECT_CALL(*pipeline, CreateNewStream())
- .Times(1)
- .WillOnce(Return(kDummyStream));
- EXPECT_EQ(kDummyStream, host_->CreateStreamOnNewPipeline(
- &connection_, ssl_config_, proxy_info_, net_log_, true,
- kProtoSPDY3));
+ EXPECT_CALL(*pipeline, CreateNewStream()).Times(1).WillOnce(
+ Return(kDummyStream));
+ EXPECT_EQ(kDummyStream,
+ host_->CreateStreamOnNewPipeline(&connection_,
+ ssl_config_,
+ proxy_info_,
+ net_log_,
+ true,
+ kProtoSPDY3));
return pipeline;
}
@@ -70,10 +75,8 @@ TEST_F(HttpPipelinedHostForcedTest, SingleUser) {
MockPipeline* pipeline = AddTestPipeline();
EXPECT_TRUE(host_->IsExistingPipelineAvailable());
- EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
- .Times(1);
- EXPECT_CALL(delegate_, OnHostIdle(host_.get()))
- .Times(1);
+ EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())).Times(1);
+ EXPECT_CALL(delegate_, OnHostIdle(host_.get())).Times(1);
host_->OnPipelineHasCapacity(pipeline);
}
@@ -81,23 +84,18 @@ TEST_F(HttpPipelinedHostForcedTest, ReuseExisting) {
EXPECT_EQ(NULL, host_->CreateStreamOnExistingPipeline());
MockPipeline* pipeline = AddTestPipeline();
- EXPECT_CALL(*pipeline, CreateNewStream())
- .Times(1)
- .WillOnce(Return(kDummyStream));
+ EXPECT_CALL(*pipeline, CreateNewStream()).Times(1).WillOnce(
+ Return(kDummyStream));
EXPECT_EQ(kDummyStream, host_->CreateStreamOnExistingPipeline());
pipeline->SetState(1, true, true);
- EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
- .Times(1);
- EXPECT_CALL(delegate_, OnHostIdle(host_.get()))
- .Times(0);
+ EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())).Times(1);
+ EXPECT_CALL(delegate_, OnHostIdle(host_.get())).Times(0);
host_->OnPipelineHasCapacity(pipeline);
pipeline->SetState(0, true, true);
- EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get()))
- .Times(1);
- EXPECT_CALL(delegate_, OnHostIdle(host_.get()))
- .Times(1);
+ EXPECT_CALL(delegate_, OnHostHasAdditionalCapacity(host_.get())).Times(1);
+ EXPECT_CALL(delegate_, OnHostIdle(host_.get())).Times(1);
host_->OnPipelineHasCapacity(pipeline);
}

Powered by Google App Engine
This is Rietveld 408576698