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

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

Issue 2555563003: Ignore 1xx informational headers. (Closed)
Patch Set: Created 4 years 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
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_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 MockWrite spdy_writes[] = { 642 MockWrite spdy_writes[] = {
643 CreateMockWrite(req, 0, ASYNC), CreateMockWrite(rst, 3, ASYNC), 643 CreateMockWrite(req, 0, ASYNC), CreateMockWrite(rst, 3, ASYNC),
644 }; 644 };
645 645
646 const char* const responseHeaders[] = { 646 const char* const responseHeaders[] = {
647 "location", redirectTarget.c_str(), 647 "location", redirectTarget.c_str(),
648 "set-cookie", "foo=bar", 648 "set-cookie", "foo=bar",
649 }; 649 };
650 const int responseHeadersSize = arraysize(responseHeaders) / 2; 650 const int responseHeadersSize = arraysize(responseHeaders) / 2;
651 SpdySerializedFrame resp(spdy_util_.ConstructSpdyReplyError( 651 SpdySerializedFrame resp(spdy_util_.ConstructSpdyReplyError(
652 "302 Found", responseHeaders, responseHeadersSize, 1)); 652 "302", responseHeaders, responseHeadersSize, 1));
653 MockRead spdy_reads[] = { 653 MockRead spdy_reads[] = {
654 CreateMockRead(resp, 1, ASYNC), MockRead(ASYNC, 0, 2), 654 CreateMockRead(resp, 1, ASYNC), MockRead(ASYNC, 0, 2),
655 }; 655 };
656 656
657 Initialize(reads, arraysize(reads), writes, arraysize(writes), 657 Initialize(reads, arraysize(reads), writes, arraysize(writes),
658 spdy_reads, arraysize(spdy_reads), spdy_writes, 658 spdy_reads, arraysize(spdy_reads), spdy_writes,
659 arraysize(spdy_writes)); 659 arraysize(spdy_writes));
660 AddAuthToCache(); 660 AddAuthToCache();
661 661
662 int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW, 662 int rv = handle_.Init("a", CreateTunnelParams(NULL), LOW,
(...skipping 30 matching lines...) Expand all
693 // Make sure Location header was included and correct. 693 // Make sure Location header was included and correct.
694 std::string location; 694 std::string location;
695 EXPECT_TRUE(headers->IsRedirect(&location)); 695 EXPECT_TRUE(headers->IsRedirect(&location));
696 EXPECT_EQ(location, redirectTarget); 696 EXPECT_EQ(location, redirectTarget);
697 } 697 }
698 } 698 }
699 699
700 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 700 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
701 701
702 } // namespace net 702 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698