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

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

Issue 1852423004: Implement SpdySerializedFrame move semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // This isn't testing anything having to do with SPDY frames; we 519 // This isn't testing anything having to do with SPDY frames; we
520 // can ignore issues of how dependencies are set. We default to 520 // can ignore issues of how dependencies are set. We default to
521 // setting them (when doing the appropriate protocol) since that's 521 // setting them (when doing the appropriate protocol) since that's
522 // where we're eventually headed for all HTTP/2 connections. 522 // where we're eventually headed for all HTTP/2 connections.
523 session_deps_.enable_priority_dependencies = true; 523 session_deps_.enable_priority_dependencies = true;
524 SpdyTestUtil spdy_util(GetParam(), /*enable_priority_dependencies*/ true); 524 SpdyTestUtil spdy_util(GetParam(), /*enable_priority_dependencies*/ true);
525 525
526 MockRead reads[] = { 526 MockRead reads[] = {
527 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. 527 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
528 }; 528 };
529 scoped_ptr<SpdyFrame> req( 529 scoped_ptr<SpdySerializedFrame> req(
530 spdy_util.ConstructSpdyGet("http://www.a.com", 1, MEDIUM)); 530 spdy_util.ConstructSpdyGet("http://www.a.com", 1, MEDIUM));
531 MockWrite writes[] = {CreateMockWrite(*req, 1)}; 531 MockWrite writes[] = {CreateMockWrite(*req, 1)};
532 532
533 StaticSocketDataProvider dataA(reads, arraysize(reads), writes, 533 StaticSocketDataProvider dataA(reads, arraysize(reads), writes,
534 arraysize(writes)); 534 arraysize(writes));
535 dataA.set_connect_data(connect_data); 535 dataA.set_connect_data(connect_data);
536 session_deps_.socket_factory->AddSocketDataProvider(&dataA); 536 session_deps_.socket_factory->AddSocketDataProvider(&dataA);
537 537
538 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); 538 SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
539 session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl); 539 session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 // there is no pushed stream on any sessions owned by |spdy_session_pool_|. 663 // there is no pushed stream on any sessions owned by |spdy_session_pool_|.
664 base::WeakPtr<SpdySession> session2 = 664 base::WeakPtr<SpdySession> session2 =
665 spdy_session_pool_->FindAvailableSession( 665 spdy_session_pool_->FindAvailableSession(
666 key, GURL("http://news.example.org/foo.html"), BoundNetLog()); 666 key, GURL("http://news.example.org/foo.html"), BoundNetLog());
667 EXPECT_EQ(session.get(), session2.get()); 667 EXPECT_EQ(session.get(), session2.get());
668 668
669 spdy_session_pool_->CloseCurrentSessions(ERR_ABORTED); 669 spdy_session_pool_->CloseCurrentSessions(ERR_ABORTED);
670 } 670 }
671 671
672 } // namespace net 672 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698