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

Side by Side Diff: net/http/http_network_transaction_spdy2_unittest.cc

Issue 10690104: DeterministicSocketDataProvider should not be RefCounted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more leak fix Created 8 years, 5 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 | « no previous file | net/http/http_network_transaction_spdy3_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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 9933 matching lines...) Expand 10 before | Expand all | Expand 10 after
9944 scoped_ptr<SpdyFrame> body2(ConstructSpdyBodyFrame(3, true)); 9944 scoped_ptr<SpdyFrame> body2(ConstructSpdyBodyFrame(3, true));
9945 MockRead reads1[] = { 9945 MockRead reads1[] = {
9946 CreateMockRead(*conn_resp, 1), 9946 CreateMockRead(*conn_resp, 1),
9947 CreateMockRead(*wrapped_resp1, 3), 9947 CreateMockRead(*wrapped_resp1, 3),
9948 CreateMockRead(*wrapped_body1, 4), 9948 CreateMockRead(*wrapped_body1, 4),
9949 CreateMockRead(*resp2, 6), 9949 CreateMockRead(*resp2, 6),
9950 CreateMockRead(*body2, 7), 9950 CreateMockRead(*body2, 7),
9951 MockRead(ASYNC, ERR_IO_PENDING, 8) 9951 MockRead(ASYNC, ERR_IO_PENDING, 8)
9952 }; 9952 };
9953 9953
9954 scoped_refptr<DeterministicSocketData> data1( 9954 scoped_ptr<DeterministicSocketData> data1(
9955 new DeterministicSocketData(reads1, arraysize(reads1), 9955 new DeterministicSocketData(reads1, arraysize(reads1),
9956 writes1, arraysize(writes1))); 9956 writes1, arraysize(writes1)));
9957 MockConnect connect_data1(ASYNC, OK); 9957 MockConnect connect_data1(ASYNC, OK);
9958 data1->set_connect_data(connect_data1); 9958 data1->set_connect_data(connect_data1);
9959 9959
9960 SpdySessionDependencies session_deps(ProxyService::CreateFixed( 9960 SpdySessionDependencies session_deps(ProxyService::CreateFixed(
9961 "https://proxy:70")); 9961 "https://proxy:70"));
9962 SSLSocketDataProvider ssl1(ASYNC, OK); // to the proxy 9962 SSLSocketDataProvider ssl1(ASYNC, OK); // to the proxy
9963 ssl1.SetNextProto(kProtoSPDY2); 9963 ssl1.SetNextProto(kProtoSPDY2);
9964 session_deps.deterministic_socket_factory->AddSSLSocketDataProvider(&ssl1); 9964 session_deps.deterministic_socket_factory->AddSSLSocketDataProvider(&ssl1);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
10069 TestCompletionCallback callback2; 10069 TestCompletionCallback callback2;
10070 EXPECT_EQ(ERR_IO_PENDING, 10070 EXPECT_EQ(ERR_IO_PENDING,
10071 trans2.Start(&request2, callback2.callback(), BoundNetLog())); 10071 trans2.Start(&request2, callback2.callback(), BoundNetLog()));
10072 MessageLoop::current()->RunAllPending(); 10072 MessageLoop::current()->RunAllPending();
10073 10073
10074 EXPECT_EQ(OK, callback2.WaitForResult()); 10074 EXPECT_EQ(OK, callback2.WaitForResult());
10075 EXPECT_TRUE(trans2.GetResponseInfo()->was_fetched_via_spdy); 10075 EXPECT_TRUE(trans2.GetResponseInfo()->was_fetched_via_spdy);
10076 } 10076 }
10077 10077
10078 } // namespace net 10078 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698