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

Side by Side Diff: remoting/base/compound_buffer_unittest.cc

Issue 660803004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « remoting/base/auto_thread_unittest.cc ('k') | remoting/base/resources_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void TestCropBack(int pos, int size) { 67 void TestCropBack(int pos, int size) {
68 CompoundBuffer cropped; 68 CompoundBuffer cropped;
69 cropped.CopyFrom(target_, 0, target_.total_bytes()); 69 cropped.CopyFrom(target_, 0, target_.total_bytes());
70 cropped.CropBack(pos); 70 cropped.CropBack(pos);
71 EXPECT_TRUE(CompareData(cropped, data_->data(), 71 EXPECT_TRUE(CompareData(cropped, data_->data(),
72 target_.total_bytes() - pos)); 72 target_.total_bytes() - pos));
73 } 73 }
74 74
75 protected: 75 protected:
76 virtual void SetUp() { 76 void SetUp() override {
77 data_ = new IOBuffer(kDataSize); 77 data_ = new IOBuffer(kDataSize);
78 for (int i = 0; i < kDataSize; ++i) { 78 for (int i = 0; i < kDataSize; ++i) {
79 data_->data()[i] = i; 79 data_->data()[i] = i;
80 } 80 }
81 } 81 }
82 82
83 // Iterate over chunks of data with sizes specified in |sizes| in the 83 // Iterate over chunks of data with sizes specified in |sizes| in the
84 // interval [0..kDataSize]. |function| is called for each chunk. 84 // interval [0..kDataSize]. |function| is called for each chunk.
85 void IterateOverPieces(const int sizes[], 85 void IterateOverPieces(const int sizes[],
86 const base::Callback<void(int, int)>& function) { 86 const base::Callback<void(int, int)>& function) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ReadString(&stream, "MultipleArrayInput"); 269 ReadString(&stream, "MultipleArrayInput");
270 EXPECT_TRUE(stream.Skip(6)); 270 EXPECT_TRUE(stream.Skip(6));
271 ReadString(&stream, "f"); 271 ReadString(&stream, "f");
272 ReadString(&stream, "o"); 272 ReadString(&stream, "o");
273 ReadString(&stream, "r"); 273 ReadString(&stream, "r");
274 ReadString(&stream, " "); 274 ReadString(&stream, " ");
275 ReadString(&stream, "Chromoting"); 275 ReadString(&stream, "Chromoting");
276 } 276 }
277 277
278 } // namespace remoting 278 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/auto_thread_unittest.cc ('k') | remoting/base/resources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698