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

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

Issue 25977005: [SPDY] Do not advertise SPDY/2 by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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 | Annotate | Revision Log
« 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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