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

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

Issue 344253008: Stop using SpdySynReplyIR for SPDY 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional test fix & SpdyTestUtil cleanup. Created 6 years, 6 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/http/http_proxy_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_framer.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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 control_frame.get()->size()); 244 control_frame.get()->size());
245 EXPECT_EQ(0, visitor.error_count_); 245 EXPECT_EQ(0, visitor.error_count_);
246 EXPECT_EQ(1, visitor.syn_frame_count_); 246 EXPECT_EQ(1, visitor.syn_frame_count_);
247 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 247 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
248 EXPECT_EQ(0, visitor.headers_frame_count_); 248 EXPECT_EQ(0, visitor.headers_frame_count_);
249 EXPECT_EQ(0, visitor.push_promise_frame_count_); 249 EXPECT_EQ(0, visitor.push_promise_frame_count_);
250 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 250 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
251 } 251 }
252 252
253 TEST_P(BufferedSpdyFramerTest, ReadSynReplyHeaderBlock) { 253 TEST_P(BufferedSpdyFramerTest, ReadSynReplyHeaderBlock) {
254 if (spdy_version() > SPDY3) {
255 return;
256 }
254 SpdyHeaderBlock headers; 257 SpdyHeaderBlock headers;
255 headers["alpha"] = "beta"; 258 headers["alpha"] = "beta";
256 headers["gamma"] = "delta"; 259 headers["gamma"] = "delta";
257 BufferedSpdyFramer framer(spdy_version(), true); 260 BufferedSpdyFramer framer(spdy_version(), true);
258 scoped_ptr<SpdyFrame> control_frame( 261 scoped_ptr<SpdyFrame> control_frame(
259 framer.CreateSynReply(1, // stream_id 262 framer.CreateSynReply(1, // stream_id
260 CONTROL_FLAG_NONE, 263 CONTROL_FLAG_NONE,
261 &headers)); 264 &headers));
262 EXPECT_TRUE(control_frame.get() != NULL); 265 EXPECT_TRUE(control_frame.get() != NULL);
263 266
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 EXPECT_EQ(0, visitor.syn_frame_count_); 323 EXPECT_EQ(0, visitor.syn_frame_count_);
321 EXPECT_EQ(0, visitor.syn_reply_frame_count_); 324 EXPECT_EQ(0, visitor.syn_reply_frame_count_);
322 EXPECT_EQ(0, visitor.headers_frame_count_); 325 EXPECT_EQ(0, visitor.headers_frame_count_);
323 EXPECT_EQ(1, visitor.push_promise_frame_count_); 326 EXPECT_EQ(1, visitor.push_promise_frame_count_);
324 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_)); 327 EXPECT_TRUE(CompareHeaderBlocks(&headers, &visitor.headers_));
325 EXPECT_EQ(1u, visitor.header_stream_id_); 328 EXPECT_EQ(1u, visitor.header_stream_id_);
326 EXPECT_EQ(2u, visitor.promised_stream_id_); 329 EXPECT_EQ(2u, visitor.promised_stream_id_);
327 } 330 }
328 331
329 } // namespace net 332 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698