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

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

Issue 10448083: Fix out of order SYN_STEAM frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make SpdyFrameProducer a nested class in SpdySession. Created 8 years, 6 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
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 4907 matching lines...) Expand 10 before | Expand all | Expand 10 after
4918 ConstructSpdyConnect(kAuthCredentials, arraysize(kAuthCredentials)/2, 3)); 4918 ConstructSpdyConnect(kAuthCredentials, arraysize(kAuthCredentials)/2, 3));
4919 // fetch https://www.google.com/ via HTTP 4919 // fetch https://www.google.com/ via HTTP
4920 const char get[] = "GET / HTTP/1.1\r\n" 4920 const char get[] = "GET / HTTP/1.1\r\n"
4921 "Host: www.google.com\r\n" 4921 "Host: www.google.com\r\n"
4922 "Connection: keep-alive\r\n\r\n"; 4922 "Connection: keep-alive\r\n\r\n";
4923 scoped_ptr<SpdyFrame> wrapped_get( 4923 scoped_ptr<SpdyFrame> wrapped_get(
4924 ConstructSpdyBodyFrame(3, get, strlen(get), false)); 4924 ConstructSpdyBodyFrame(3, get, strlen(get), false));
4925 4925
4926 MockWrite spdy_writes[] = { 4926 MockWrite spdy_writes[] = {
4927 CreateMockWrite(*req, 0, ASYNC), 4927 CreateMockWrite(*req, 0, ASYNC),
4928 CreateMockWrite(*connect2, 2), 4928 CreateMockWrite(*rst, 2, ASYNC),
4929 CreateMockWrite(*rst, 3, ASYNC), 4929 CreateMockWrite(*connect2, 3),
4930 CreateMockWrite(*wrapped_get, 5), 4930 CreateMockWrite(*wrapped_get, 5),
4931 }; 4931 };
4932 4932
4933 // The proxy responds to the connect with a 407, using a persistent 4933 // The proxy responds to the connect with a 407, using a persistent
4934 // connection. 4934 // connection.
4935 const char* const kAuthChallenge[] = { 4935 const char* const kAuthChallenge[] = {
4936 "status", "407 Proxy Authentication Required", 4936 "status", "407 Proxy Authentication Required",
4937 "version", "HTTP/1.1", 4937 "version", "HTTP/1.1",
4938 "proxy-authenticate", "Basic realm=\"MyRealm1\"", 4938 "proxy-authenticate", "Basic realm=\"MyRealm1\"",
4939 }; 4939 };
(...skipping 4791 matching lines...) Expand 10 before | Expand all | Expand 10 after
9731 StaticSocketDataProvider* data[] = { &data1, &data2 }; 9731 StaticSocketDataProvider* data[] = { &data1, &data2 };
9732 9732
9733 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); 9733 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data));
9734 9734
9735 EXPECT_EQ(OK, out.rv); 9735 EXPECT_EQ(OK, out.rv);
9736 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); 9736 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line);
9737 EXPECT_EQ("hello world", out.response_data); 9737 EXPECT_EQ("hello world", out.response_data);
9738 } 9738 }
9739 9739
9740 } // namespace net 9740 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy3_unittest.cc » ('j') | net/spdy/spdy_session.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698