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

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

Issue 12262004: Remove SpdyRstStreamControlFrame struct. Useful for SPDY 4 development. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/buffered_spdy_framer_spdy2_unittest.cc ('k') | net/spdy/spdy_framer.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_spdy3.h" 7 #include "net/spdy/spdy_test_util_spdy3.h"
8 #include "testing/platform_test.h" 8 #include "testing/platform_test.h"
9 9
10 using namespace net::test_spdy3; 10 using namespace net::test_spdy3;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 bool OnCredentialFrameData(const char*, size_t) { 98 bool OnCredentialFrameData(const char*, size_t) {
99 LOG(FATAL) << "Unexpected OnCredentialFrameData call."; 99 LOG(FATAL) << "Unexpected OnCredentialFrameData call.";
100 return false; 100 return false;
101 } 101 }
102 102
103 void OnDataFrameHeader(const SpdyDataFrame* frame) { 103 void OnDataFrameHeader(const SpdyDataFrame* frame) {
104 LOG(FATAL) << "Unexpected OnDataFrameHeader call."; 104 LOG(FATAL) << "Unexpected OnDataFrameHeader call.";
105 } 105 }
106 106
107 void OnRstStream(const SpdyRstStreamControlFrame& frame) {} 107 void OnRstStream(const SpdyFrame& frame) {}
108 void OnGoAway(const SpdyFrame& frame) {} 108 void OnGoAway(const SpdyFrame& frame) {}
109 void OnPing(const SpdyFrame& frame) {} 109 void OnPing(const SpdyFrame& frame) {}
110 virtual void OnWindowUpdate(SpdyStreamId stream_id, 110 virtual void OnWindowUpdate(SpdyStreamId stream_id,
111 int delta_window_size) OVERRIDE { 111 int delta_window_size) OVERRIDE {
112 } 112 }
113 void OnCredential(const SpdyCredentialControlFrame& frame) {} 113 void OnCredential(const SpdyCredentialControlFrame& frame) {}
114 114
115 // Convenience function which runs a framer simulation with particular input. 115 // Convenience function which runs a framer simulation with particular input.
116 void SimulateInFramer(const unsigned char* input, size_t size) { 116 void SimulateInFramer(const unsigned char* input, size_t size) {
117 buffered_spdy_framer_.set_visitor(this); 117 buffered_spdy_framer_.set_visitor(this);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 visitor.SimulateInFramer( 266 visitor.SimulateInFramer(
267 reinterpret_cast<unsigned char*>(control_frame.get()->data()), 267 reinterpret_cast<unsigned char*>(control_frame.get()->data()),
268 control_frame.get()->length() + SpdyControlFrame::kHeaderSize); 268 control_frame.get()->length() + SpdyControlFrame::kHeaderSize);
269 EXPECT_EQ(0, visitor.error_count_); 269 EXPECT_EQ(0, visitor.error_count_);
270 EXPECT_EQ(0, visitor.syn_frame_count_); 270 EXPECT_EQ(0, visitor.syn_frame_count_);
271 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 271 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
272 EXPECT_EQ(1, visitor.headers_frame_count_); 272 EXPECT_EQ(1, visitor.headers_frame_count_);
273 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 273 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
274 } 274 }
275 } // namespace net 275 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer_spdy2_unittest.cc ('k') | net/spdy/spdy_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698