OLD | NEW |
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 "net/spdy/spdy_test_util_spdy2.h" | 5 #include "net/spdy/spdy_test_util_spdy2.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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 header_info.data_length, | 205 header_info.data_length, |
206 header_info.data_flags); | 206 header_info.data_flags); |
207 break; | 207 break; |
208 } | 208 } |
209 return frame; | 209 return frame; |
210 } | 210 } |
211 | 211 |
212 // Construct an expected SPDY SETTINGS frame. | 212 // Construct an expected SPDY SETTINGS frame. |
213 // |settings| are the settings to set. | 213 // |settings| are the settings to set. |
214 // Returns the constructed frame. The caller takes ownership of the frame. | 214 // Returns the constructed frame. The caller takes ownership of the frame. |
215 SpdyFrame* ConstructSpdySettings( | 215 SpdyFrame* ConstructSpdySettings(const SettingsMap& settings) { |
216 const SpdySettings& settings) { | |
217 BufferedSpdyFramer framer(2); | 216 BufferedSpdyFramer framer(2); |
218 return framer.CreateSettings(settings); | 217 return framer.CreateSettings(settings); |
219 } | 218 } |
220 | 219 |
221 // Construct an expected SPDY CREDENTIAL frame. | 220 // Construct an expected SPDY CREDENTIAL frame. |
222 // |credential| is the credential to sen. | 221 // |credential| is the credential to sen. |
223 // Returns the constructed frame. The caller takes ownership of the frame. | 222 // Returns the constructed frame. The caller takes ownership of the frame. |
224 SpdyFrame* ConstructSpdyCredential( | 223 SpdyFrame* ConstructSpdyCredential( |
225 const SpdyCredential& credential) { | 224 const SpdyCredential& credential) { |
226 BufferedSpdyFramer framer(2); | 225 BufferedSpdyFramer framer(2); |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 } | 1011 } |
1013 | 1012 |
1014 SpdyTestStateHelper::~SpdyTestStateHelper() { | 1013 SpdyTestStateHelper::~SpdyTestStateHelper() { |
1015 SpdySession::ResetStaticSettingsToInit(); | 1014 SpdySession::ResetStaticSettingsToInit(); |
1016 // TODO(rch): save/restore this value | 1015 // TODO(rch): save/restore this value |
1017 SpdyFramer::set_enable_compression_default(true); | 1016 SpdyFramer::set_enable_compression_default(true); |
1018 } | 1017 } |
1019 | 1018 |
1020 } // namespace test_spdy2 | 1019 } // namespace test_spdy2 |
1021 } // namespace net | 1020 } // namespace net |
OLD | NEW |