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

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: Address comments 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
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_test_util_common.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/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 "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_); 2402 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_);
2403 } 2403 }
2404 2404
2405 // Within this framework and with the "enable_spdy_4" flag, a 2405 // Within this framework and with the "enable_spdy_4" flag, a
2406 // SpdySession should be initialized with flow control enabled for 2406 // SpdySession should be initialized with flow control enabled for
2407 // streams and sessions and with protocol version 4. 2407 // streams and sessions and with protocol version 4.
2408 // 2408 //
2409 // NOTE(akalin): We are still figuring out the story for SPDY4 test 2409 // NOTE(akalin): We are still figuring out the story for SPDY4 test
2410 // coverage. 2410 // coverage.
2411 TEST_F(SpdySessionSpdy3Test, ProtocolNegotiation4) { 2411 TEST_F(SpdySessionSpdy3Test, ProtocolNegotiation4) {
2412 session_deps_.protocol = kProtoSPDY4a1; 2412 session_deps_.protocol = kProtoSPDY4a2;
2413 session_deps_.host_resolver->set_synchronous_mode(true); 2413 session_deps_.host_resolver->set_synchronous_mode(true);
2414 2414
2415 MockConnect connect_data(SYNCHRONOUS, OK); 2415 MockConnect connect_data(SYNCHRONOUS, OK);
2416 MockRead reads[] = { 2416 MockRead reads[] = {
2417 MockRead(SYNCHRONOUS, 0, 0) // EOF 2417 MockRead(SYNCHRONOUS, 0, 0) // EOF
2418 }; 2418 };
2419 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); 2419 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
2420 data.set_connect_data(connect_data); 2420 data.set_connect_data(connect_data);
2421 session_deps_.socket_factory->AddSocketDataProvider(&data); 2421 session_deps_.socket_factory->AddSocketDataProvider(&data);
2422 2422
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
3728 // Cancelling the request should still not release the session's socket, 3728 // Cancelling the request should still not release the session's socket,
3729 // since the session is still kept alive by the SpdySessionPool. 3729 // since the session is still kept alive by the SpdySessionPool.
3730 ASSERT_TRUE(spdy_stream1.get()); 3730 ASSERT_TRUE(spdy_stream1.get());
3731 spdy_stream1->Cancel(); 3731 spdy_stream1->Cancel();
3732 base::RunLoop().RunUntilIdle(); 3732 base::RunLoop().RunUntilIdle();
3733 EXPECT_TRUE(pool->IsStalled()); 3733 EXPECT_TRUE(pool->IsStalled());
3734 EXPECT_FALSE(callback2.have_result()); 3734 EXPECT_FALSE(callback2.have_result());
3735 } 3735 }
3736 3736
3737 } // namespace net 3737 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698