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/buffered_spdy_framer.h" | 5 #include "net/spdy/buffered_spdy_framer.h" |
6 | 6 |
7 #include "net/spdy/spdy_test_util_common.h" | 7 #include "net/spdy/spdy_test_util_common.h" |
8 #include "testing/platform_test.h" | 8 #include "testing/platform_test.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 SpdyMajorVersion spdy_version() { | 182 SpdyMajorVersion spdy_version() { |
183 return NextProtoToSpdyMajorVersion(GetParam()); | 183 return NextProtoToSpdyMajorVersion(GetParam()); |
184 } | 184 } |
185 }; | 185 }; |
186 | 186 |
187 INSTANTIATE_TEST_CASE_P( | 187 INSTANTIATE_TEST_CASE_P( |
188 NextProto, | 188 NextProto, |
189 BufferedSpdyFramerTest, | 189 BufferedSpdyFramerTest, |
190 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, | 190 testing::Values(kProtoDeprecatedSPDY2, |
| 191 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, |
191 kProtoHTTP2Draft04)); | 192 kProtoHTTP2Draft04)); |
192 | 193 |
193 TEST_P(BufferedSpdyFramerTest, OnSetting) { | 194 TEST_P(BufferedSpdyFramerTest, OnSetting) { |
194 SpdyFramer framer(spdy_version()); | 195 SpdyFramer framer(spdy_version()); |
195 SettingsMap settings; | 196 SettingsMap settings; |
196 settings[SETTINGS_UPLOAD_BANDWIDTH] = | 197 settings[SETTINGS_UPLOAD_BANDWIDTH] = |
197 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0x00000002); | 198 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0x00000002); |
198 settings[SETTINGS_DOWNLOAD_BANDWIDTH] = | 199 settings[SETTINGS_DOWNLOAD_BANDWIDTH] = |
199 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0x00000003); | 200 SettingsFlagsAndValue(SETTINGS_FLAG_NONE, 0x00000003); |
200 | 201 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 reinterpret_cast<unsigned char*>(control_frame.get()->data()), | 275 reinterpret_cast<unsigned char*>(control_frame.get()->data()), |
275 control_frame.get()->size()); | 276 control_frame.get()->size()); |
276 EXPECT_EQ(0, visitor.error_count_); | 277 EXPECT_EQ(0, visitor.error_count_); |
277 EXPECT_EQ(0, visitor.syn_frame_count_); | 278 EXPECT_EQ(0, visitor.syn_frame_count_); |
278 EXPECT_EQ(0, visitor.syn_reply_frame_count_); | 279 EXPECT_EQ(0, visitor.syn_reply_frame_count_); |
279 EXPECT_EQ(1, visitor.headers_frame_count_); | 280 EXPECT_EQ(1, visitor.headers_frame_count_); |
280 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); | 281 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); |
281 } | 282 } |
282 | 283 |
283 } // namespace net | 284 } // namespace net |
OLD | NEW |