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

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

Issue 710713002: Remove SPDY2 and SPDY/3.0 from tests. (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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 SpdyMajorVersion spdy_version() { 201 SpdyMajorVersion spdy_version() {
202 return NextProtoToSpdyMajorVersion(GetParam()); 202 return NextProtoToSpdyMajorVersion(GetParam());
203 } 203 }
204 }; 204 };
205 205
206 INSTANTIATE_TEST_CASE_P( 206 INSTANTIATE_TEST_CASE_P(
207 NextProto, 207 NextProto,
208 BufferedSpdyFramerTest, 208 BufferedSpdyFramerTest,
209 testing::Values(kProtoDeprecatedSPDY2, 209 testing::Values(kProtoSPDY31, kProtoSPDY4));
210 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4));
211 210
212 TEST_P(BufferedSpdyFramerTest, OnSetting) { 211 TEST_P(BufferedSpdyFramerTest, OnSetting) {
213 SpdyFramer framer(spdy_version()); 212 SpdyFramer framer(spdy_version());
214 SpdySettingsIR settings_ir; 213 SpdySettingsIR settings_ir;
215 settings_ir.AddSetting(SETTINGS_INITIAL_WINDOW_SIZE, false, false, 2); 214 settings_ir.AddSetting(SETTINGS_INITIAL_WINDOW_SIZE, false, false, 2);
216 settings_ir.AddSetting(SETTINGS_MAX_CONCURRENT_STREAMS, false, false, 3); 215 settings_ir.AddSetting(SETTINGS_MAX_CONCURRENT_STREAMS, false, false, 3);
217 scoped_ptr<SpdyFrame> control_frame(framer.SerializeSettings(settings_ir)); 216 scoped_ptr<SpdyFrame> control_frame(framer.SerializeSettings(settings_ir));
218 TestBufferedSpdyVisitor visitor(spdy_version()); 217 TestBufferedSpdyVisitor visitor(spdy_version());
219 218
220 visitor.SimulateInFramer( 219 visitor.SimulateInFramer(
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 EXPECT_EQ(0, visitor.syn_frame_count_); 326 EXPECT_EQ(0, visitor.syn_frame_count_);
328 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 327 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
329 EXPECT_EQ(0, visitor.headers_frame_count_); 328 EXPECT_EQ(0, visitor.headers_frame_count_);
330 EXPECT_EQ(1, visitor.push_promise_frame_count_); 329 EXPECT_EQ(1, visitor.push_promise_frame_count_);
331 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 330 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
332 EXPECT_EQ(1u, visitor.header_stream_id_); 331 EXPECT_EQ(1u, visitor.header_stream_id_);
333 EXPECT_EQ(2u, visitor.promised_stream_id_); 332 EXPECT_EQ(2u, visitor.promised_stream_id_);
334 } 333 }
335 334
336 } // namespace net 335 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698