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

Side by Side Diff: net/spdy/spdy_framer_test.cc

Issue 1328563002: clang_tidy net/spdy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/spdy/spdy_framer.cc ('k') | net/spdy/spdy_pinnable_buffer_piece.h » ('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/spdy/spdy_framer.h" 5 #include "net/spdy/spdy_framer.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 bool fin) override { 291 bool fin) override {
292 ++data_frame_count_; 292 ++data_frame_count_;
293 header_stream_id_ = stream_id; 293 header_stream_id_ = stream_id;
294 } 294 }
295 295
296 void OnStreamFrameData(SpdyStreamId stream_id, 296 void OnStreamFrameData(SpdyStreamId stream_id,
297 const char* data, 297 const char* data,
298 size_t len, 298 size_t len,
299 bool fin) override { 299 bool fin) override {
300 EXPECT_EQ(header_stream_id_, stream_id); 300 EXPECT_EQ(header_stream_id_, stream_id);
301 if (len == 0) 301 if (len == 0) {
302 ++zero_length_data_frame_count_; 302 ++zero_length_data_frame_count_;
303 }
303 304
304 data_bytes_ += len; 305 data_bytes_ += len;
305 LOG(INFO) << "OnStreamFrameData(" << stream_id << ", \""; 306 LOG(INFO) << "OnStreamFrameData(" << stream_id << ", \"";
306 if (len > 0) { 307 if (len > 0) {
307 for (size_t i = 0 ; i < len; ++i) { 308 for (size_t i = 0 ; i < len; ++i) {
308 LOG(INFO) << std::hex << (0xFF & static_cast<unsigned int>(data[i])) 309 LOG(INFO) << std::hex << (0xFF & static_cast<unsigned int>(data[i]))
309 << std::dec; 310 << std::dec;
310 } 311 }
311 } 312 }
312 LOG(INFO) << "\", " << len << ")\n"; 313 LOG(INFO) << "\", " << len << ")\n";
(...skipping 5828 matching lines...) Expand 10 before | Expand all | Expand 10 after
6141 6142
6142 EXPECT_EQ(1, visitor->data_frame_count_); 6143 EXPECT_EQ(1, visitor->data_frame_count_);
6143 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_)); 6144 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_));
6144 EXPECT_EQ(0, visitor->headers_frame_count_); 6145 EXPECT_EQ(0, visitor->headers_frame_count_);
6145 } 6146 }
6146 } 6147 }
6147 6148
6148 } // namespace test 6149 } // namespace test
6149 6150
6150 } // namespace net 6151 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer.cc ('k') | net/spdy/spdy_pinnable_buffer_piece.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698