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

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

Issue 10448083: Fix out of order SYN_STEAM frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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 4926 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 ConstructSpdyConnect(kAuthCredentials, arraysize(kAuthCredentials)/2, 3)); 4937 ConstructSpdyConnect(kAuthCredentials, arraysize(kAuthCredentials)/2, 3));
4938 // fetch https://www.google.com/ via HTTP 4938 // fetch https://www.google.com/ via HTTP
4939 const char get[] = "GET / HTTP/1.1\r\n" 4939 const char get[] = "GET / HTTP/1.1\r\n"
4940 "Host: www.google.com\r\n" 4940 "Host: www.google.com\r\n"
4941 "Connection: keep-alive\r\n\r\n"; 4941 "Connection: keep-alive\r\n\r\n";
4942 scoped_ptr<SpdyFrame> wrapped_get( 4942 scoped_ptr<SpdyFrame> wrapped_get(
4943 ConstructSpdyBodyFrame(3, get, strlen(get), false)); 4943 ConstructSpdyBodyFrame(3, get, strlen(get), false));
4944 4944
4945 MockWrite spdy_writes[] = { 4945 MockWrite spdy_writes[] = {
4946 CreateMockWrite(*req, 0, ASYNC), 4946 CreateMockWrite(*req, 0, ASYNC),
4947 CreateMockWrite(*connect2, 2), 4947 CreateMockWrite(*rst, 2, ASYNC),
4948 CreateMockWrite(*rst, 3, ASYNC), 4948 CreateMockWrite(*connect2, 3),
4949 CreateMockWrite(*wrapped_get, 5) 4949 CreateMockWrite(*wrapped_get, 5)
4950 }; 4950 };
4951 4951
4952 // The proxy responds to the connect with a 407, using a persistent 4952 // The proxy responds to the connect with a 407, using a persistent
4953 // connection. 4953 // connection.
4954 const char* const kAuthChallenge[] = { 4954 const char* const kAuthChallenge[] = {
4955 ":status", "407 Proxy Authentication Required", 4955 ":status", "407 Proxy Authentication Required",
4956 ":version", "HTTP/1.1", 4956 ":version", "HTTP/1.1",
4957 "proxy-authenticate", "Basic realm=\"MyRealm1\"", 4957 "proxy-authenticate", "Basic realm=\"MyRealm1\"",
4958 }; 4958 };
(...skipping 4841 matching lines...) Expand 10 before | Expand all | Expand 10 after
9800 StaticSocketDataProvider* data[] = { &data1, &data2 }; 9800 StaticSocketDataProvider* data[] = { &data1, &data2 };
9801 9801
9802 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); 9802 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data));
9803 9803
9804 EXPECT_EQ(OK, out.rv); 9804 EXPECT_EQ(OK, out.rv);
9805 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); 9805 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line);
9806 EXPECT_EQ("hello world", out.response_data); 9806 EXPECT_EQ("hello world", out.response_data);
9807 } 9807 }
9808 9808
9809 } // namespace net 9809 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698