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

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

Issue 14189003: [SPDY] Incorporate latest framing changes from HTTP2 into SPDY 4 as SPDY 4a2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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
« net/http/http_stream_factory.cc ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | 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/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_); 2341 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_);
2342 } 2342 }
2343 2343
2344 // Within this framework and with the "enable_spdy_4" flag, a 2344 // Within this framework and with the "enable_spdy_4" flag, a
2345 // SpdySession should be initialized with flow control enabled for 2345 // SpdySession should be initialized with flow control enabled for
2346 // streams and sessions and with protocol version 4. 2346 // streams and sessions and with protocol version 4.
2347 // 2347 //
2348 // NOTE(akalin): We are still figuring out the story for SPDY4 test 2348 // NOTE(akalin): We are still figuring out the story for SPDY4 test
2349 // coverage. 2349 // coverage.
2350 TEST_F(SpdySessionSpdy3Test, ProtocolNegotiation4) { 2350 TEST_F(SpdySessionSpdy3Test, ProtocolNegotiation4) {
2351 session_deps_.protocol = kProtoSPDY4a1; 2351 session_deps_.protocol = kProtoSPDY4a2;
2352 session_deps_.host_resolver->set_synchronous_mode(true); 2352 session_deps_.host_resolver->set_synchronous_mode(true);
2353 2353
2354 MockConnect connect_data(SYNCHRONOUS, OK); 2354 MockConnect connect_data(SYNCHRONOUS, OK);
2355 MockRead reads[] = { 2355 MockRead reads[] = {
2356 MockRead(SYNCHRONOUS, 0, 0) // EOF 2356 MockRead(SYNCHRONOUS, 0, 0) // EOF
2357 }; 2357 };
2358 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); 2358 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
2359 data.set_connect_data(connect_data); 2359 data.set_connect_data(connect_data);
2360 session_deps_.socket_factory->AddSocketDataProvider(&data); 2360 session_deps_.socket_factory->AddSocketDataProvider(&data);
2361 2361
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3469 EXPECT_EQ(0, delegate1.body_data_sent()); 3469 EXPECT_EQ(0, delegate1.body_data_sent());
3470 3470
3471 EXPECT_TRUE(delegate2.send_headers_completed()); 3471 EXPECT_TRUE(delegate2.send_headers_completed());
3472 EXPECT_EQ("200", delegate2.GetResponseHeaderValue(":status")); 3472 EXPECT_EQ("200", delegate2.GetResponseHeaderValue(":status"));
3473 EXPECT_EQ("HTTP/1.1", delegate2.GetResponseHeaderValue(":version")); 3473 EXPECT_EQ("HTTP/1.1", delegate2.GetResponseHeaderValue(":version"));
3474 EXPECT_EQ(std::string(), delegate2.TakeReceivedData()); 3474 EXPECT_EQ(std::string(), delegate2.TakeReceivedData());
3475 EXPECT_EQ(0, delegate2.body_data_sent()); 3475 EXPECT_EQ(0, delegate2.body_data_sent());
3476 } 3476 }
3477 3477
3478 } // namespace net 3478 } // namespace net
OLDNEW
« net/http/http_stream_factory.cc ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698