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

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

Issue 2335513003: Use modifed URLRequest API in net/spdy and test embedded server (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | net/test/spawned_test_server/spawner_communicator.h » ('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 <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 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 d.set_quit_on_redirect(true); 2281 d.set_quit_on_redirect(true);
2282 r->Start(); 2282 r->Start();
2283 base::RunLoop().Run(); 2283 base::RunLoop().Run();
2284 2284
2285 EXPECT_EQ(1, d.received_redirect_count()); 2285 EXPECT_EQ(1, d.received_redirect_count());
2286 2286
2287 r->FollowDeferredRedirect(); 2287 r->FollowDeferredRedirect();
2288 base::RunLoop().Run(); 2288 base::RunLoop().Run();
2289 EXPECT_EQ(1, d.response_started_count()); 2289 EXPECT_EQ(1, d.response_started_count());
2290 EXPECT_FALSE(d.received_data_before_response()); 2290 EXPECT_FALSE(d.received_data_before_response());
2291 EXPECT_EQ(OK, r->status().error()); 2291 EXPECT_EQ(OK, d.request_status());
2292 std::string contents("hello!"); 2292 std::string contents("hello!");
2293 EXPECT_EQ(contents, d.data_received()); 2293 EXPECT_EQ(contents, d.data_received());
2294 } 2294 }
2295 EXPECT_TRUE(data.AllReadDataConsumed()); 2295 EXPECT_TRUE(data.AllReadDataConsumed());
2296 EXPECT_TRUE(data.AllWriteDataConsumed()); 2296 EXPECT_TRUE(data.AllWriteDataConsumed());
2297 EXPECT_TRUE(data2.AllReadDataConsumed()); 2297 EXPECT_TRUE(data2.AllReadDataConsumed());
2298 EXPECT_TRUE(data2.AllWriteDataConsumed()); 2298 EXPECT_TRUE(data2.AllWriteDataConsumed());
2299 } 2299 }
2300 2300
2301 // Send a spdy request to www.example.org. Get a pushed stream that redirects to 2301 // 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
2367 2367
2368 d2.set_quit_on_redirect(true); 2368 d2.set_quit_on_redirect(true);
2369 r2->Start(); 2369 r2->Start();
2370 base::RunLoop().Run(); 2370 base::RunLoop().Run();
2371 EXPECT_EQ(1, d2.received_redirect_count()); 2371 EXPECT_EQ(1, d2.received_redirect_count());
2372 2372
2373 r2->FollowDeferredRedirect(); 2373 r2->FollowDeferredRedirect();
2374 base::RunLoop().Run(); 2374 base::RunLoop().Run();
2375 EXPECT_EQ(1, d2.response_started_count()); 2375 EXPECT_EQ(1, d2.response_started_count());
2376 EXPECT_FALSE(d2.received_data_before_response()); 2376 EXPECT_FALSE(d2.received_data_before_response());
2377 EXPECT_EQ(OK, r2->status().error()); 2377 EXPECT_EQ(OK, d2.request_status());
2378 std::string contents2("hello!"); 2378 std::string contents2("hello!");
2379 EXPECT_EQ(contents2, d2.data_received()); 2379 EXPECT_EQ(contents2, d2.data_received());
2380 } 2380 }
2381 EXPECT_TRUE(data.AllReadDataConsumed()); 2381 EXPECT_TRUE(data.AllReadDataConsumed());
2382 EXPECT_TRUE(data.AllWriteDataConsumed()); 2382 EXPECT_TRUE(data.AllWriteDataConsumed());
2383 EXPECT_TRUE(data2.AllReadDataConsumed()); 2383 EXPECT_TRUE(data2.AllReadDataConsumed());
2384 EXPECT_TRUE(data2.AllWriteDataConsumed()); 2384 EXPECT_TRUE(data2.AllWriteDataConsumed());
2385 } 2385 }
2386 2386
2387 TEST_F(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) { 2387 TEST_F(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) {
(...skipping 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6350 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6351 std::unique_ptr<SSLSocketDataProvider> ssl_provider( 6351 std::unique_ptr<SSLSocketDataProvider> ssl_provider(
6352 new SSLSocketDataProvider(ASYNC, OK)); 6352 new SSLSocketDataProvider(ASYNC, OK));
6353 // Set to TLS_RSA_WITH_NULL_MD5 6353 // Set to TLS_RSA_WITH_NULL_MD5
6354 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6354 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6355 6355
6356 RunTLSUsageCheckTest(std::move(ssl_provider)); 6356 RunTLSUsageCheckTest(std::move(ssl_provider));
6357 } 6357 }
6358 6358
6359 } // namespace net 6359 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/test/spawned_test_server/spawner_communicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698