| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/upload_bytes_element_reader.h" | 5 #include "net/base/upload_bytes_element_reader.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | |
| 8 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 9 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
| 10 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "testing/platform_test.h" | 11 #include "testing/platform_test.h" |
| 13 | 12 |
| 14 namespace net { | 13 namespace net { |
| 15 | 14 |
| 16 class UploadBytesElementReaderTest : public PlatformTest { | 15 class UploadBytesElementReaderTest : public PlatformTest { |
| 17 protected: | 16 protected: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 83 |
| 85 // Read again. | 84 // Read again. |
| 86 EXPECT_EQ( | 85 EXPECT_EQ( |
| 87 static_cast<int>(buf.size()), | 86 static_cast<int>(buf.size()), |
| 88 reader_->Read(wrapped_buffer.get(), buf.size(), CompletionCallback())); | 87 reader_->Read(wrapped_buffer.get(), buf.size(), CompletionCallback())); |
| 89 EXPECT_EQ(0U, reader_->BytesRemaining()); | 88 EXPECT_EQ(0U, reader_->BytesRemaining()); |
| 90 EXPECT_EQ(bytes_, buf); | 89 EXPECT_EQ(bytes_, buf); |
| 91 } | 90 } |
| 92 | 91 |
| 93 } // namespace net | 92 } // namespace net |
| OLD | NEW |