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

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

Issue 2777333002: Simplify the the logic for setting the final response status for a (Closed)
Patch Set: Created 3 years, 8 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
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 <memory> 5 #include <memory>
6 #include <ostream> 6 #include <ostream>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 mock_quic_data2.AddSocketDataToFactory(&socket_factory_); 1075 mock_quic_data2.AddSocketDataToFactory(&socket_factory_);
1076 1076
1077 CreateSession(); 1077 CreateSession();
1078 1078
1079 EXPECT_EQ(0U, test_socket_performance_watcher_factory_.watcher_count()); 1079 EXPECT_EQ(0U, test_socket_performance_watcher_factory_.watcher_count());
1080 for (size_t i = 0; i < 2; ++i) { 1080 for (size_t i = 0; i < 2; ++i) {
1081 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get()); 1081 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
1082 TestCompletionCallback callback; 1082 TestCompletionCallback callback;
1083 int rv = trans.Start(&request_, callback.callback(), net_log_.bound()); 1083 int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
1084 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); 1084 EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
1085 EXPECT_THAT(callback.WaitForResult(), IsError(ERR_CONNECTION_CLOSED)); 1085 EXPECT_THAT(callback.WaitForResult(), IsError(ERR_SOCKET_NOT_CONNECTED));
1086 EXPECT_EQ(1 + i, test_socket_performance_watcher_factory_.watcher_count()); 1086 EXPECT_EQ(1 + i, test_socket_performance_watcher_factory_.watcher_count());
1087 } 1087 }
1088 } 1088 }
1089 1089
1090 TEST_P(QuicNetworkTransactionTest, DoNotForceQuicForHttps) { 1090 TEST_P(QuicNetworkTransactionTest, DoNotForceQuicForHttps) {
1091 // Attempt to "force" quic on 443, which will not be honored. 1091 // Attempt to "force" quic on 443, which will not be honored.
1092 params_.origins_to_force_quic_on.insert( 1092 params_.origins_to_force_quic_on.insert(
1093 HostPortPair::FromString("www.google.com:443")); 1093 HostPortPair::FromString("www.google.com:443"));
1094 1094
1095 MockRead http_reads[] = { 1095 MockRead http_reads[] = {
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after
3510 AddHangingSocketData(); 3510 AddHangingSocketData();
3511 3511
3512 SendRequestAndExpectQuicResponse(origin1_); 3512 SendRequestAndExpectQuicResponse(origin1_);
3513 SendRequestAndExpectQuicResponse(origin2_); 3513 SendRequestAndExpectQuicResponse(origin2_);
3514 3514
3515 EXPECT_TRUE(AllDataConsumed()); 3515 EXPECT_TRUE(AllDataConsumed());
3516 } 3516 }
3517 3517
3518 } // namespace test 3518 } // namespace test
3519 } // namespace net 3519 } // namespace net
OLDNEW
« net/quic/chromium/quic_http_stream.cc ('K') | « net/quic/chromium/quic_http_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698