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

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

Issue 959743002: Account for HTTP/2 padding in receive windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more mock implementation. Created 5 years, 9 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/buffered_spdy_framer.cc ('k') | net/spdy/mock_spdy_framer_visitor.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/buffered_spdy_framer.h" 5 #include "net/spdy/buffered_spdy_framer.h"
6 6
7 #include "net/spdy/spdy_test_util_common.h" 7 #include "net/spdy/spdy_test_util_common.h"
8 #include "testing/platform_test.h" 8 #include "testing/platform_test.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ADD_FAILURE() << "Unexpected OnDataFrameHeader call."; 75 ADD_FAILURE() << "Unexpected OnDataFrameHeader call.";
76 } 76 }
77 77
78 void OnStreamFrameData(SpdyStreamId stream_id, 78 void OnStreamFrameData(SpdyStreamId stream_id,
79 const char* data, 79 const char* data,
80 size_t len, 80 size_t len,
81 bool fin) override { 81 bool fin) override {
82 LOG(FATAL) << "Unexpected OnStreamFrameData call."; 82 LOG(FATAL) << "Unexpected OnStreamFrameData call.";
83 } 83 }
84 84
85 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override {
86 LOG(FATAL) << "Unexpected OnStreamPadding call.";
87 }
88
85 void OnSettings(bool clear_persisted) override {} 89 void OnSettings(bool clear_persisted) override {}
86 90
87 void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override { 91 void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {
88 setting_count_++; 92 setting_count_++;
89 } 93 }
90 94
91 void OnPing(SpdyPingId unique_id, bool is_ack) override {} 95 void OnPing(SpdyPingId unique_id, bool is_ack) override {}
92 96
93 void OnRstStream(SpdyStreamId stream_id, 97 void OnRstStream(SpdyStreamId stream_id,
94 SpdyRstStreamStatus status) override {} 98 SpdyRstStreamStatus status) override {}
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 EXPECT_EQ(0, visitor.syn_frame_count_); 334 EXPECT_EQ(0, visitor.syn_frame_count_);
331 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 335 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
332 EXPECT_EQ(0, visitor.headers_frame_count_); 336 EXPECT_EQ(0, visitor.headers_frame_count_);
333 EXPECT_EQ(1, visitor.push_promise_frame_count_); 337 EXPECT_EQ(1, visitor.push_promise_frame_count_);
334 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 338 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
335 EXPECT_EQ(1u, visitor.header_stream_id_); 339 EXPECT_EQ(1u, visitor.header_stream_id_);
336 EXPECT_EQ(2u, visitor.promised_stream_id_); 340 EXPECT_EQ(2u, visitor.promised_stream_id_);
337 } 341 }
338 342
339 } // namespace net 343 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/mock_spdy_framer_visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698