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

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

Issue 12259004: Remove SpdyPingControlFrame 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/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 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 TEST_P(SpdyFramerTest, CreatePingFrame) { 2144 TEST_P(SpdyFramerTest, CreatePingFrame) {
2145 SpdyFramer framer(spdy_version_); 2145 SpdyFramer framer(spdy_version_);
2146 2146
2147 { 2147 {
2148 const char kDescription[] = "PING frame"; 2148 const char kDescription[] = "PING frame";
2149 const unsigned char kFrameData[] = { 2149 const unsigned char kFrameData[] = {
2150 0x80, spdy_version_, 0x00, 0x06, 2150 0x80, spdy_version_, 0x00, 0x06,
2151 0x00, 0x00, 0x00, 0x04, 2151 0x00, 0x00, 0x00, 0x04,
2152 0x12, 0x34, 0x56, 0x78, 2152 0x12, 0x34, 0x56, 0x78,
2153 }; 2153 };
2154 scoped_ptr<SpdyPingControlFrame> frame(framer.CreatePingFrame(0x12345678u)); 2154 scoped_ptr<SpdyFrame> frame(framer.CreatePingFrame(0x12345678u));
2155 CompareFrame(kDescription, *frame, kFrameData, arraysize(kFrameData)); 2155 CompareFrame(kDescription, *frame, kFrameData, arraysize(kFrameData));
2156 } 2156 }
2157 } 2157 }
2158 2158
2159 TEST_P(SpdyFramerTest, CreateGoAway) { 2159 TEST_P(SpdyFramerTest, CreateGoAway) {
2160 SpdyFramer framer(spdy_version_); 2160 SpdyFramer framer(spdy_version_);
2161 2161
2162 { 2162 {
2163 const char kDescription[] = "GOAWAY frame"; 2163 const char kDescription[] = "GOAWAY frame";
2164 const unsigned char kV2FrameData[] = { 2164 const unsigned char kV2FrameData[] = {
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3553 const uint32 kWireFormat = htonl(IsSpdy2() ? 0x04030201 : 0x01020304); 3553 const uint32 kWireFormat = htonl(IsSpdy2() ? 0x04030201 : 0x01020304);
3554 3554
3555 SettingsFlagsAndId id_and_flags = 3555 SettingsFlagsAndId id_and_flags =
3556 SettingsFlagsAndId::FromWireFormat(spdy_version_, kWireFormat); 3556 SettingsFlagsAndId::FromWireFormat(spdy_version_, kWireFormat);
3557 EXPECT_EQ(kId, id_and_flags.id()); 3557 EXPECT_EQ(kId, id_and_flags.id());
3558 EXPECT_EQ(kFlags, id_and_flags.flags()); 3558 EXPECT_EQ(kFlags, id_and_flags.flags());
3559 EXPECT_EQ(kWireFormat, id_and_flags.GetWireFormat(spdy_version_)); 3559 EXPECT_EQ(kWireFormat, id_and_flags.GetWireFormat(spdy_version_));
3560 } 3560 }
3561 3561
3562 } // namespace net 3562 } // 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