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

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

Issue 10815074: Instead of enqueueing SPDY frames, enqueue SPDY streams that are ready to produce data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove logging and cleanup Created 8 years, 4 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 4921 matching lines...) Expand 10 before | Expand all | Expand 10 after
4932 ConstructSpdyConnect(kAuthCredentials, arraysize(kAuthCredentials)/2, 3)); 4932 ConstructSpdyConnect(kAuthCredentials, arraysize(kAuthCredentials)/2, 3));
4933 // fetch https://www.google.com/ via HTTP 4933 // fetch https://www.google.com/ via HTTP
4934 const char get[] = "GET / HTTP/1.1\r\n" 4934 const char get[] = "GET / HTTP/1.1\r\n"
4935 "Host: www.google.com\r\n" 4935 "Host: www.google.com\r\n"
4936 "Connection: keep-alive\r\n\r\n"; 4936 "Connection: keep-alive\r\n\r\n";
4937 scoped_ptr<SpdyFrame> wrapped_get( 4937 scoped_ptr<SpdyFrame> wrapped_get(
4938 ConstructSpdyBodyFrame(3, get, strlen(get), false)); 4938 ConstructSpdyBodyFrame(3, get, strlen(get), false));
4939 4939
4940 MockWrite spdy_writes[] = { 4940 MockWrite spdy_writes[] = {
4941 CreateMockWrite(*req, 1, ASYNC), 4941 CreateMockWrite(*req, 1, ASYNC),
4942 CreateMockWrite(*connect2, 4), 4942 CreateMockWrite(*rst, 4, ASYNC),
4943 CreateMockWrite(*rst, 5, ASYNC), 4943 CreateMockWrite(*connect2, 5),
4944 CreateMockWrite(*wrapped_get, 8), 4944 CreateMockWrite(*wrapped_get, 8),
4945 }; 4945 };
4946 4946
4947 // The proxy responds to the connect with a 407, using a persistent 4947 // The proxy responds to the connect with a 407, using a persistent
4948 // connection. 4948 // connection.
4949 const char* const kAuthChallenge[] = { 4949 const char* const kAuthChallenge[] = {
4950 "status", "407 Proxy Authentication Required", 4950 "status", "407 Proxy Authentication Required",
4951 "version", "HTTP/1.1", 4951 "version", "HTTP/1.1",
4952 "proxy-authenticate", "Basic realm=\"MyRealm1\"", 4952 "proxy-authenticate", "Basic realm=\"MyRealm1\"",
4953 }; 4953 };
(...skipping 5233 matching lines...) Expand 10 before | Expand all | Expand 10 after
10187 trans2.Start(&request2, callback2.callback(), BoundNetLog())); 10187 trans2.Start(&request2, callback2.callback(), BoundNetLog()));
10188 MessageLoop::current()->RunAllPending(); 10188 MessageLoop::current()->RunAllPending();
10189 data2->RunFor(3); 10189 data2->RunFor(3);
10190 10190
10191 ASSERT_TRUE(callback2.have_result()); 10191 ASSERT_TRUE(callback2.have_result());
10192 EXPECT_EQ(OK, callback2.WaitForResult()); 10192 EXPECT_EQ(OK, callback2.WaitForResult());
10193 EXPECT_TRUE(trans2.GetResponseInfo()->was_fetched_via_spdy); 10193 EXPECT_TRUE(trans2.GetResponseInfo()->was_fetched_via_spdy);
10194 } 10194 }
10195 10195
10196 } // namespace net 10196 } // 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