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

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

Issue 265763011: Land recent SPDY changes (through 66310528) (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/hpack_string_util.h ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_frame_builder.h" 5 #include "net/spdy/spdy_frame_builder.h"
6 6
7 #include "net/spdy/spdy_framer.h" 7 #include "net/spdy/spdy_framer.h"
8 #include "net/spdy/spdy_protocol.h" 8 #include "net/spdy/spdy_protocol.h"
9 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 TEST_P(SpdyFrameBuilderTest, OverwriteFlags) { 62 TEST_P(SpdyFrameBuilderTest, OverwriteFlags) {
63 // Create a HEADERS frame both via framer and manually via builder with 63 // Create a HEADERS frame both via framer and manually via builder with
64 // different flags set, then make them match using OverwriteFlags(). 64 // different flags set, then make them match using OverwriteFlags().
65 SpdyFramer framer(spdy_version_); 65 SpdyFramer framer(spdy_version_);
66 if (spdy_version_ <= SPDY3) { 66 if (spdy_version_ <= SPDY3) {
67 return; 67 return;
68 } 68 }
69 SpdyHeadersIR headers_ir(1); 69 SpdyHeadersIR headers_ir(1);
70 headers_ir.set_end_headers(false);
71 scoped_ptr<SpdyFrame> expected(framer.SerializeHeaders(headers_ir)); 70 scoped_ptr<SpdyFrame> expected(framer.SerializeHeaders(headers_ir));
72 SpdyFrameBuilder builder(expected->size(), spdy_version_); 71 SpdyFrameBuilder builder(expected->size(), spdy_version_);
73 builder.BeginNewFrame(framer, HEADERS, HEADERS_FLAG_END_HEADERS, 1); 72 builder.BeginNewFrame(framer, HEADERS, 0, 1);
74 builder.OverwriteFlags(framer, 0); 73 builder.OverwriteFlags(framer, HEADERS_FLAG_END_HEADERS);
75 scoped_ptr<SpdyFrame> built(builder.take()); 74 scoped_ptr<SpdyFrame> built(builder.take());
76 EXPECT_EQ(base::StringPiece(expected->data(), expected->size()), 75 EXPECT_EQ(base::StringPiece(expected->data(), expected->size()),
77 base::StringPiece(built->data(), built->size())); 76 base::StringPiece(built->data(), built->size()));
78 } 77 }
79 78
80 } // namespace net 79 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/hpack_string_util.h ('k') | net/spdy/spdy_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698