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

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

Issue 724523002: Support HTTP/2 drafts 14 and 15 simultaneously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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 "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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 SpdyMajorVersion spdy_version() { 203 SpdyMajorVersion spdy_version() {
204 return NextProtoToSpdyMajorVersion(GetParam()); 204 return NextProtoToSpdyMajorVersion(GetParam());
205 } 205 }
206 }; 206 };
207 207
208 INSTANTIATE_TEST_CASE_P( 208 INSTANTIATE_TEST_CASE_P(
209 NextProto, 209 NextProto,
210 BufferedSpdyFramerTest, 210 BufferedSpdyFramerTest,
211 testing::Values(kProtoDeprecatedSPDY2, 211 testing::Values(kProtoDeprecatedSPDY2,
212 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4)); 212 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15));
213 213
214 TEST_P(BufferedSpdyFramerTest, OnSetting) { 214 TEST_P(BufferedSpdyFramerTest, OnSetting) {
215 SpdyFramer framer(spdy_version()); 215 SpdyFramer framer(spdy_version());
216 SpdySettingsIR settings_ir; 216 SpdySettingsIR settings_ir;
217 settings_ir.AddSetting(SETTINGS_INITIAL_WINDOW_SIZE, false, false, 2); 217 settings_ir.AddSetting(SETTINGS_INITIAL_WINDOW_SIZE, false, false, 2);
218 settings_ir.AddSetting(SETTINGS_MAX_CONCURRENT_STREAMS, false, false, 3); 218 settings_ir.AddSetting(SETTINGS_MAX_CONCURRENT_STREAMS, false, false, 3);
219 scoped_ptr<SpdyFrame> control_frame(framer.SerializeSettings(settings_ir)); 219 scoped_ptr<SpdyFrame> control_frame(framer.SerializeSettings(settings_ir));
220 TestBufferedSpdyVisitor visitor(spdy_version()); 220 TestBufferedSpdyVisitor visitor(spdy_version());
221 221
222 visitor.SimulateInFramer( 222 visitor.SimulateInFramer(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 EXPECT_EQ(0, visitor.syn_frame_count_); 330 EXPECT_EQ(0, visitor.syn_frame_count_);
331 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 331 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
332 EXPECT_EQ(0, visitor.headers_frame_count_); 332 EXPECT_EQ(0, visitor.headers_frame_count_);
333 EXPECT_EQ(1, visitor.push_promise_frame_count_); 333 EXPECT_EQ(1, visitor.push_promise_frame_count_);
334 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 334 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
335 EXPECT_EQ(1u, visitor.header_stream_id_); 335 EXPECT_EQ(1u, visitor.header_stream_id_);
336 EXPECT_EQ(2u, visitor.promised_stream_id_); 336 EXPECT_EQ(2u, visitor.promised_stream_id_);
337 } 337 }
338 338
339 } // namespace net 339 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698