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

Side by Side Diff: net/quic/quic_network_transaction_unittest.cc

Issue 305213002: Do not mark QUIC as *broken* when a 0-RTT fails because this prevents us (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/quic/quic_stream_factory.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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // Alternate-protocol job 824 // Alternate-protocol job
825 MockRead quic_reads[] = { 825 MockRead quic_reads[] = {
826 MockRead(ASYNC, ERR_SOCKET_NOT_CONNECTED), 826 MockRead(ASYNC, ERR_SOCKET_NOT_CONNECTED),
827 }; 827 };
828 StaticSocketDataProvider quic_data(quic_reads, arraysize(quic_reads), 828 StaticSocketDataProvider quic_data(quic_reads, arraysize(quic_reads),
829 NULL, 0); 829 NULL, 0);
830 socket_factory_.AddSocketDataProvider(&quic_data); 830 socket_factory_.AddSocketDataProvider(&quic_data);
831 831
832 AddHangingNonAlternateProtocolSocketData(); 832 AddHangingNonAlternateProtocolSocketData();
833 833
834 // Second Alternate-protocol job which will race with the TCP job.
835 StaticSocketDataProvider quic_data2(quic_reads, arraysize(quic_reads),
836 NULL, 0);
837 socket_factory_.AddSocketDataProvider(&quic_data2);
838
834 // Final job that will proceed when the QUIC job fails. 839 // Final job that will proceed when the QUIC job fails.
835 MockRead http_reads[] = { 840 MockRead http_reads[] = {
836 MockRead("HTTP/1.1 200 OK\r\n\r\n"), 841 MockRead("HTTP/1.1 200 OK\r\n\r\n"),
837 MockRead("hello from http"), 842 MockRead("hello from http"),
838 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ), 843 MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
839 MockRead(ASYNC, OK) 844 MockRead(ASYNC, OK)
840 }; 845 };
841 846
842 StaticSocketDataProvider http_data(http_reads, arraysize(http_reads), 847 StaticSocketDataProvider http_data(http_reads, arraysize(http_reads),
843 NULL, 0); 848 NULL, 0);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 NULL, 922 NULL,
918 net_log_.bound()); 923 net_log_.bound());
919 924
920 CreateSessionWithNextProtos(); 925 CreateSessionWithNextProtos();
921 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); 926 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
922 SendRequestAndExpectHttpResponse("hello world"); 927 SendRequestAndExpectHttpResponse("hello world");
923 } 928 }
924 929
925 } // namespace test 930 } // namespace test
926 } // namespace net 931 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698