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

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

Issue 266243004: Clang format slam. 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
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 virtual void SetUp() { 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 scoped_ptr<SpdyFrame> expected(framer.SerializeHeaders(headers_ir)); 69 scoped_ptr<SpdyFrame> expected(framer.SerializeHeaders(headers_ir));
72 SpdyFrameBuilder builder(expected->size(), spdy_version_); 70 SpdyFrameBuilder builder(expected->size(), spdy_version_);
73 builder.BeginNewFrame(framer, HEADERS, HEADERS_FLAG_END_HEADERS, 1); 71 builder.BeginNewFrame(framer, HEADERS, HEADERS_FLAG_END_HEADERS, 1);
74 builder.OverwriteFlags(framer, 0); 72 builder.OverwriteFlags(framer, 0);
75 scoped_ptr<SpdyFrame> built(builder.take()); 73 scoped_ptr<SpdyFrame> built(builder.take());
76 EXPECT_EQ(base::StringPiece(expected->data(), expected->size()), 74 EXPECT_EQ(base::StringPiece(expected->data(), expected->size()),
77 base::StringPiece(built->data(), built->size())); 75 base::StringPiece(built->data(), built->size()));
78 } 76 }
79 77
80 } // namespace net 78 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698