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

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

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/hpack_round_trip_test.cc ('k') | net/spdy/spdy_framer_test.cc » ('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
11 namespace net { 11 namespace net {
12 12
13 class SpdyFrameBuilderTest : public ::testing::TestWithParam<SpdyMajorVersion> { 13 class SpdyFrameBuilderTest : public ::testing::TestWithParam<SpdyMajorVersion> {
14 protected: 14 protected:
15 virtual void SetUp() { 15 void SetUp() override { spdy_version_ = GetParam(); }
16 spdy_version_ = GetParam();
17 }
18 16
19 // Major version of SPDY protocol to be used. 17 // Major version of SPDY protocol to be used.
20 SpdyMajorVersion spdy_version_; 18 SpdyMajorVersion spdy_version_;
21 }; 19 };
22 20
23 // All tests are run with two different SPDY versions: SPDY/2 and SPDY/3. 21 // All tests are run with two different SPDY versions: SPDY/2 and SPDY/3.
24 INSTANTIATE_TEST_CASE_P(SpdyFrameBuilderTests, 22 INSTANTIATE_TEST_CASE_P(SpdyFrameBuilderTests,
25 SpdyFrameBuilderTest, 23 SpdyFrameBuilderTest,
26 ::testing::Values(SPDY2, SPDY3, SPDY4)); 24 ::testing::Values(SPDY2, SPDY3, SPDY4));
27 25
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 scoped_ptr<SpdyFrame> expected(framer.SerializeHeaders(headers_ir)); 68 scoped_ptr<SpdyFrame> expected(framer.SerializeHeaders(headers_ir));
71 SpdyFrameBuilder builder(expected->size(), spdy_version_); 69 SpdyFrameBuilder builder(expected->size(), spdy_version_);
72 builder.BeginNewFrame(framer, HEADERS, 0, 1); 70 builder.BeginNewFrame(framer, HEADERS, 0, 1);
73 builder.OverwriteFlags(framer, HEADERS_FLAG_END_HEADERS); 71 builder.OverwriteFlags(framer, HEADERS_FLAG_END_HEADERS);
74 scoped_ptr<SpdyFrame> built(builder.take()); 72 scoped_ptr<SpdyFrame> built(builder.take());
75 EXPECT_EQ(base::StringPiece(expected->data(), expected->size()), 73 EXPECT_EQ(base::StringPiece(expected->data(), expected->size()),
76 base::StringPiece(built->data(), built->size())); 74 base::StringPiece(built->data(), built->size()));
77 } 75 }
78 76
79 } // namespace net 77 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/hpack_round_trip_test.cc ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698