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

Side by Side Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 2265873002: Adjust callers and networking delegates in net/ to modified APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: rebased Created 4 years, 3 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 <cmath> 5 #include <cmath>
6 #include <memory> 6 #include <memory>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 d.set_quit_on_redirect(true); 2158 d.set_quit_on_redirect(true);
2159 r->Start(); 2159 r->Start();
2160 base::RunLoop().Run(); 2160 base::RunLoop().Run();
2161 2161
2162 EXPECT_EQ(1, d.received_redirect_count()); 2162 EXPECT_EQ(1, d.received_redirect_count());
2163 2163
2164 r->FollowDeferredRedirect(); 2164 r->FollowDeferredRedirect();
2165 base::RunLoop().Run(); 2165 base::RunLoop().Run();
2166 EXPECT_EQ(1, d.response_started_count()); 2166 EXPECT_EQ(1, d.response_started_count());
2167 EXPECT_FALSE(d.received_data_before_response()); 2167 EXPECT_FALSE(d.received_data_before_response());
2168 EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status()); 2168 EXPECT_EQ(OK, d.request_status());
2169 std::string contents("hello!"); 2169 std::string contents("hello!");
2170 EXPECT_EQ(contents, d.data_received()); 2170 EXPECT_EQ(contents, d.data_received());
2171 } 2171 }
2172 EXPECT_TRUE(data.AllReadDataConsumed()); 2172 EXPECT_TRUE(data.AllReadDataConsumed());
2173 EXPECT_TRUE(data.AllWriteDataConsumed()); 2173 EXPECT_TRUE(data.AllWriteDataConsumed());
2174 EXPECT_TRUE(data2.AllReadDataConsumed()); 2174 EXPECT_TRUE(data2.AllReadDataConsumed());
2175 EXPECT_TRUE(data2.AllWriteDataConsumed()); 2175 EXPECT_TRUE(data2.AllWriteDataConsumed());
2176 } 2176 }
2177 2177
2178 // Send a spdy request to www.example.org. Get a pushed stream that redirects to 2178 // Send a spdy request to www.example.org. Get a pushed stream that redirects to
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 2244
2245 d2.set_quit_on_redirect(true); 2245 d2.set_quit_on_redirect(true);
2246 r2->Start(); 2246 r2->Start();
2247 base::RunLoop().Run(); 2247 base::RunLoop().Run();
2248 EXPECT_EQ(1, d2.received_redirect_count()); 2248 EXPECT_EQ(1, d2.received_redirect_count());
2249 2249
2250 r2->FollowDeferredRedirect(); 2250 r2->FollowDeferredRedirect();
2251 base::RunLoop().Run(); 2251 base::RunLoop().Run();
2252 EXPECT_EQ(1, d2.response_started_count()); 2252 EXPECT_EQ(1, d2.response_started_count());
2253 EXPECT_FALSE(d2.received_data_before_response()); 2253 EXPECT_FALSE(d2.received_data_before_response());
2254 EXPECT_EQ(URLRequestStatus::SUCCESS, r2->status().status()); 2254 EXPECT_EQ(OK, d.request_status());
2255 std::string contents2("hello!"); 2255 std::string contents2("hello!");
2256 EXPECT_EQ(contents2, d2.data_received()); 2256 EXPECT_EQ(contents2, d2.data_received());
2257 } 2257 }
2258 EXPECT_TRUE(data.AllReadDataConsumed()); 2258 EXPECT_TRUE(data.AllReadDataConsumed());
2259 EXPECT_TRUE(data.AllWriteDataConsumed()); 2259 EXPECT_TRUE(data.AllWriteDataConsumed());
2260 EXPECT_TRUE(data2.AllReadDataConsumed()); 2260 EXPECT_TRUE(data2.AllReadDataConsumed());
2261 EXPECT_TRUE(data2.AllWriteDataConsumed()); 2261 EXPECT_TRUE(data2.AllWriteDataConsumed());
2262 } 2262 }
2263 2263
2264 TEST_F(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) { 2264 TEST_F(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) {
(...skipping 3959 matching lines...) Expand 10 before | Expand all | Expand 10 after
6224 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6224 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6225 std::unique_ptr<SSLSocketDataProvider> ssl_provider( 6225 std::unique_ptr<SSLSocketDataProvider> ssl_provider(
6226 new SSLSocketDataProvider(ASYNC, OK)); 6226 new SSLSocketDataProvider(ASYNC, OK));
6227 // Set to TLS_RSA_WITH_NULL_MD5 6227 // Set to TLS_RSA_WITH_NULL_MD5
6228 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6228 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6229 6229
6230 RunTLSUsageCheckTest(std::move(ssl_provider)); 6230 RunTLSUsageCheckTest(std::move(ssl_provider));
6231 } 6231 }
6232 6232
6233 } // namespace net 6233 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698