| Index: net/http/http_response_body_drainer_unittest.cc
|
| diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
|
| index f587b9085293c777743eda5e91b7fdd97eb55aea..b1d9a59cdbe3ae1509548405790af369dc3ea0c7 100644
|
| --- a/net/http/http_response_body_drainer_unittest.cc
|
| +++ b/net/http/http_response_body_drainer_unittest.cc
|
| @@ -25,16 +25,14 @@ namespace net {
|
| namespace {
|
|
|
| const int kMagicChunkSize = 1024;
|
| -COMPILE_ASSERT(
|
| - (HttpResponseBodyDrainer::kDrainBodyBufferSize % kMagicChunkSize) == 0,
|
| - chunk_size_needs_to_divide_evenly_into_buffer_size);
|
| +COMPILE_ASSERT((HttpResponseBodyDrainer::kDrainBodyBufferSize %
|
| + kMagicChunkSize) == 0,
|
| + chunk_size_needs_to_divide_evenly_into_buffer_size);
|
|
|
| class CloseResultWaiter {
|
| public:
|
| CloseResultWaiter()
|
| - : result_(false),
|
| - have_result_(false),
|
| - waiting_for_result_(false) {}
|
| + : result_(false), have_result_(false), waiting_for_result_(false) {}
|
|
|
| int WaitForResult() {
|
| CHECK(!waiting_for_result_);
|
| @@ -107,7 +105,8 @@ class MockHttpStream : public HttpStream {
|
| SSLCertRequestInfo* cert_request_info) OVERRIDE {}
|
|
|
| // Mocked API
|
| - virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
|
| + virtual int ReadResponseBody(IOBuffer* buf,
|
| + int buf_len,
|
| const CompletionCallback& callback) OVERRIDE;
|
| virtual void Close(bool not_reusable) OVERRIDE {
|
| CHECK(!closed_);
|
| @@ -115,16 +114,16 @@ class MockHttpStream : public HttpStream {
|
| result_waiter_->set_result(not_reusable);
|
| }
|
|
|
| - virtual HttpStream* RenewStreamForAuth() OVERRIDE {
|
| - return NULL;
|
| - }
|
| + virtual HttpStream* RenewStreamForAuth() OVERRIDE { return NULL; }
|
|
|
| virtual bool IsResponseBodyComplete() const OVERRIDE { return is_complete_; }
|
|
|
| virtual bool IsSpdyHttpStream() const OVERRIDE { return false; }
|
|
|
| virtual bool GetLoadTimingInfo(
|
| - LoadTimingInfo* load_timing_info) const OVERRIDE { return false; }
|
| + LoadTimingInfo* load_timing_info) const OVERRIDE {
|
| + return false;
|
| + }
|
|
|
| virtual void Drain(HttpNetworkSession*) OVERRIDE {}
|
|
|
| @@ -232,7 +231,7 @@ class HttpResponseBodyDrainerTest : public testing::Test {
|
| scoped_ptr<HttpServerPropertiesImpl> http_server_properties_;
|
| const scoped_refptr<HttpNetworkSession> session_;
|
| CloseResultWaiter result_waiter_;
|
| - MockHttpStream* const mock_stream_; // Owned by |drainer_|.
|
| + MockHttpStream* const mock_stream_; // Owned by |drainer_|.
|
| HttpResponseBodyDrainer* const drainer_; // Deletes itself.
|
| };
|
|
|
| @@ -275,8 +274,8 @@ TEST_F(HttpResponseBodyDrainerTest, DrainBodySyncEmptyChunk) {
|
| }
|
|
|
| TEST_F(HttpResponseBodyDrainerTest, DrainBodySizeEqualsDrainBuffer) {
|
| - mock_stream_->set_num_chunks(
|
| - HttpResponseBodyDrainer::kDrainBodyBufferSize / kMagicChunkSize);
|
| + mock_stream_->set_num_chunks(HttpResponseBodyDrainer::kDrainBodyBufferSize /
|
| + kMagicChunkSize);
|
| drainer_->Start(session_.get());
|
| EXPECT_FALSE(result_waiter_.WaitForResult());
|
| }
|
|
|