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

Side by Side Diff: net/base/upload_bytes_element_reader_unittest.cc

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « net/base/upload_bytes_element_reader.h ('k') | net/base/upload_data_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 class UploadBytesElementReaderTest : public PlatformTest { 16 class UploadBytesElementReaderTest : public PlatformTest {
17 protected: 17 protected:
18 virtual void SetUp() OVERRIDE { 18 virtual void SetUp() override {
19 const char kData[] = "123abc"; 19 const char kData[] = "123abc";
20 bytes_.assign(kData, kData + arraysize(kData)); 20 bytes_.assign(kData, kData + arraysize(kData));
21 reader_.reset(new UploadBytesElementReader(&bytes_[0], bytes_.size())); 21 reader_.reset(new UploadBytesElementReader(&bytes_[0], bytes_.size()));
22 ASSERT_EQ(OK, reader_->Init(CompletionCallback())); 22 ASSERT_EQ(OK, reader_->Init(CompletionCallback()));
23 EXPECT_EQ(bytes_.size(), reader_->GetContentLength()); 23 EXPECT_EQ(bytes_.size(), reader_->GetContentLength());
24 EXPECT_EQ(bytes_.size(), reader_->BytesRemaining()); 24 EXPECT_EQ(bytes_.size(), reader_->BytesRemaining());
25 EXPECT_TRUE(reader_->IsInMemory()); 25 EXPECT_TRUE(reader_->IsInMemory());
26 } 26 }
27 27
28 std::vector<char> bytes_; 28 std::vector<char> bytes_;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // Read again. 85 // Read again.
86 EXPECT_EQ( 86 EXPECT_EQ(
87 static_cast<int>(buf.size()), 87 static_cast<int>(buf.size()),
88 reader_->Read(wrapped_buffer.get(), buf.size(), CompletionCallback())); 88 reader_->Read(wrapped_buffer.get(), buf.size(), CompletionCallback()));
89 EXPECT_EQ(0U, reader_->BytesRemaining()); 89 EXPECT_EQ(0U, reader_->BytesRemaining());
90 EXPECT_EQ(bytes_, buf); 90 EXPECT_EQ(bytes_, buf);
91 } 91 }
92 92
93 } // namespace net 93 } // namespace net
OLDNEW
« no previous file with comments | « net/base/upload_bytes_element_reader.h ('k') | net/base/upload_data_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698