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

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

Issue 263033007: SPDY: Remove redundant end_push_promise and end_headers fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/spdy_framer.cc ('k') | net/spdy/spdy_protocol.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 <algorithm> 5 #include <algorithm>
6 #include <iostream> 6 #include <iostream>
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 4735 matching lines...) Expand 10 before | Expand all | Expand 10 after
4746 4746
4747 EXPECT_CALL(debug_visitor, OnSendCompressedFrame(42, HEADERS, _, _)); 4747 EXPECT_CALL(debug_visitor, OnSendCompressedFrame(42, HEADERS, _, _));
4748 EXPECT_CALL(debug_visitor, OnReceiveCompressedFrame(42, HEADERS, _)); 4748 EXPECT_CALL(debug_visitor, OnReceiveCompressedFrame(42, HEADERS, _));
4749 EXPECT_CALL(visitor, OnHeaders(42, 0, false)); 4749 EXPECT_CALL(visitor, OnHeaders(42, 0, false));
4750 EXPECT_CALL(visitor, OnControlFrameHeaderData(42, _, _)) 4750 EXPECT_CALL(visitor, OnControlFrameHeaderData(42, _, _))
4751 .WillRepeatedly(testing::Return(true)); 4751 .WillRepeatedly(testing::Return(true));
4752 EXPECT_CALL(debug_visitor, OnSendCompressedFrame(42, CONTINUATION, _, _)); 4752 EXPECT_CALL(debug_visitor, OnSendCompressedFrame(42, CONTINUATION, _, _));
4753 4753
4754 SpdyHeadersIR headers_ir(42); 4754 SpdyHeadersIR headers_ir(42);
4755 headers_ir.SetHeader("foo", "bar"); 4755 headers_ir.SetHeader("foo", "bar");
4756 headers_ir.set_end_headers(false);
4757 scoped_ptr<SpdyFrame> frame0(framer.SerializeHeaders(headers_ir)); 4756 scoped_ptr<SpdyFrame> frame0(framer.SerializeHeaders(headers_ir));
4757 SetFrameFlags(frame0.get(), 0, spdy_version_);
4758 4758
4759 SpdyContinuationIR continuation(42); 4759 SpdyContinuationIR continuation(42);
4760 continuation.SetHeader("foo", "bar"); 4760 continuation.SetHeader("foo", "bar");
4761 scoped_ptr<SpdySerializedFrame> frame( 4761 scoped_ptr<SpdySerializedFrame> frame(
4762 framer.SerializeContinuation(continuation)); 4762 framer.SerializeContinuation(continuation));
4763 SetFrameFlags(frame.get(), flags, spdy_version_); 4763 SetFrameFlags(frame.get(), flags, spdy_version_);
4764 4764
4765 if (flags & ~(HEADERS_FLAG_END_HEADERS)) { 4765 if (flags & ~(HEADERS_FLAG_END_HEADERS)) {
4766 EXPECT_CALL(visitor, OnError(_)); 4766 EXPECT_CALL(visitor, OnError(_));
4767 } else { 4767 } else {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
4953 SpdyBlockedIR blocked_ir(0); 4953 SpdyBlockedIR blocked_ir(0);
4954 scoped_ptr<SpdySerializedFrame> frame(framer.SerializeFrame(blocked_ir)); 4954 scoped_ptr<SpdySerializedFrame> frame(framer.SerializeFrame(blocked_ir));
4955 framer.ProcessInput(frame->data(), framer.GetBlockedSize()); 4955 framer.ProcessInput(frame->data(), framer.GetBlockedSize());
4956 4956
4957 EXPECT_EQ(SpdyFramer::SPDY_RESET, framer.state()); 4957 EXPECT_EQ(SpdyFramer::SPDY_RESET, framer.state());
4958 EXPECT_EQ(SpdyFramer::SPDY_NO_ERROR, framer.error_code()) 4958 EXPECT_EQ(SpdyFramer::SPDY_NO_ERROR, framer.error_code())
4959 << SpdyFramer::ErrorCodeToString(framer.error_code()); 4959 << SpdyFramer::ErrorCodeToString(framer.error_code());
4960 } 4960 }
4961 4961
4962 } // namespace net 4962 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer.cc ('k') | net/spdy/spdy_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698