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

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

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('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 "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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
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(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); 211 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15, kProtoSPDY4));
212 212
213 TEST_P(BufferedSpdyFramerTest, OnSetting) { 213 TEST_P(BufferedSpdyFramerTest, OnSetting) {
214 SpdyFramer framer(spdy_version()); 214 SpdyFramer framer(spdy_version());
215 SpdySettingsIR settings_ir; 215 SpdySettingsIR settings_ir;
216 settings_ir.AddSetting(SETTINGS_INITIAL_WINDOW_SIZE, false, false, 2); 216 settings_ir.AddSetting(SETTINGS_INITIAL_WINDOW_SIZE, false, false, 2);
217 settings_ir.AddSetting(SETTINGS_MAX_CONCURRENT_STREAMS, false, false, 3); 217 settings_ir.AddSetting(SETTINGS_MAX_CONCURRENT_STREAMS, false, false, 3);
218 scoped_ptr<SpdyFrame> control_frame(framer.SerializeSettings(settings_ir)); 218 scoped_ptr<SpdyFrame> control_frame(framer.SerializeSettings(settings_ir));
219 TestBufferedSpdyVisitor visitor(spdy_version()); 219 TestBufferedSpdyVisitor visitor(spdy_version());
220 220
221 visitor.SimulateInFramer( 221 visitor.SimulateInFramer(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 EXPECT_EQ(0, visitor.syn_frame_count_); 329 EXPECT_EQ(0, visitor.syn_frame_count_);
330 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 330 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
331 EXPECT_EQ(0, visitor.headers_frame_count_); 331 EXPECT_EQ(0, visitor.headers_frame_count_);
332 EXPECT_EQ(1, visitor.push_promise_frame_count_); 332 EXPECT_EQ(1, visitor.push_promise_frame_count_);
333 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 333 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
334 EXPECT_EQ(1u, visitor.header_stream_id_); 334 EXPECT_EQ(1u, visitor.header_stream_id_);
335 EXPECT_EQ(2u, visitor.promised_stream_id_); 335 EXPECT_EQ(2u, visitor.promised_stream_id_);
336 } 336 }
337 337
338 } // namespace net 338 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698