| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_test_util.h" | 5 #include "net/spdy/spdy_test_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 | 190 |
| 191 // Construct an expected SPDY SETTINGS frame. | 191 // Construct an expected SPDY SETTINGS frame. |
| 192 // |settings| are the settings to set. | 192 // |settings| are the settings to set. |
| 193 // Returns the constructed frame. The caller takes ownership of the frame. | 193 // Returns the constructed frame. The caller takes ownership of the frame. |
| 194 spdy::SpdyFrame* ConstructSpdySettings(spdy::SpdySettings settings) { | 194 spdy::SpdyFrame* ConstructSpdySettings(spdy::SpdySettings settings) { |
| 195 spdy::SpdyFramer framer; | 195 spdy::SpdyFramer framer; |
| 196 return framer.CreateSettings(settings); | 196 return framer.CreateSettings(settings); |
| 197 } | 197 } |
| 198 | 198 |
| 199 // Construct a SPDY PING frame. |
| 200 // Returns the constructed frame. The caller takes ownership of the frame. |
| 201 spdy::SpdyFrame* ConstructSpdyPing() { |
| 202 spdy::SpdyFramer framer; |
| 203 return framer.CreatePingFrame(1); |
| 204 } |
| 205 |
| 199 // Construct a SPDY GOAWAY frame. | 206 // Construct a SPDY GOAWAY frame. |
| 200 // Returns the constructed frame. The caller takes ownership of the frame. | 207 // Returns the constructed frame. The caller takes ownership of the frame. |
| 201 spdy::SpdyFrame* ConstructSpdyGoAway() { | 208 spdy::SpdyFrame* ConstructSpdyGoAway() { |
| 202 spdy::SpdyFramer framer; | 209 spdy::SpdyFramer framer; |
| 203 return framer.CreateGoAway(0); | 210 return framer.CreateGoAway(0); |
| 204 } | 211 } |
| 205 | 212 |
| 206 // Construct a SPDY WINDOW_UPDATE frame. | 213 // Construct a SPDY WINDOW_UPDATE frame. |
| 207 // Returns the constructed frame. The caller takes ownership of the frame. | 214 // Returns the constructed frame. The caller takes ownership of the frame. |
| 208 spdy::SpdyFrame* ConstructSpdyWindowUpdate( | 215 spdy::SpdyFrame* ConstructSpdyWindowUpdate( |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 spdy::CONTROL_FLAG_FIN, // Control Flags | 988 spdy::CONTROL_FLAG_FIN, // Control Flags |
| 982 false, // Compressed | 989 false, // Compressed |
| 983 spdy::INVALID, // Status | 990 spdy::INVALID, // Status |
| 984 NULL, // Data | 991 NULL, // Data |
| 985 0, // Length | 992 0, // Length |
| 986 spdy::DATA_FLAG_NONE // Data Flags | 993 spdy::DATA_FLAG_NONE // Data Flags |
| 987 }; | 994 }; |
| 988 return kHeader; | 995 return kHeader; |
| 989 } | 996 } |
| 990 } // namespace net | 997 } // namespace net |
| OLD | NEW |