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

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

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: Created 5 years, 9 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 OrderedSocketData data2(reads2, arraysize(reads2), 2478 OrderedSocketData data2(reads2, arraysize(reads2),
2479 writes2, arraysize(writes2)); 2479 writes2, arraysize(writes2));
2480 2480
2481 // TODO(erikchen): Make test support SPDYSSL, SPDYNPN 2481 // TODO(erikchen): Make test support SPDYSSL, SPDYNPN
2482 TestDelegate d; 2482 TestDelegate d;
2483 { 2483 {
2484 SpdyURLRequestContext spdy_url_request_context( 2484 SpdyURLRequestContext spdy_url_request_context(
2485 GetParam().protocol, 2485 GetParam().protocol,
2486 false /* force_spdy_over_ssl*/, 2486 false /* force_spdy_over_ssl*/,
2487 true /* force_spdy_always */); 2487 true /* force_spdy_always */);
2488 scoped_ptr<URLRequest> r( 2488 scoped_ptr<URLRequest> r(spdy_url_request_context.CreateRequest(
2489 spdy_url_request_context.CreateRequest(GURL("http://www.google.com/"), 2489 GURL("http://www.google.com/"), DEFAULT_PRIORITY, &d));
2490 DEFAULT_PRIORITY,
2491 &d,
2492 NULL));
2493 spdy_url_request_context.socket_factory(). 2490 spdy_url_request_context.socket_factory().
2494 AddSocketDataProvider(&data); 2491 AddSocketDataProvider(&data);
2495 spdy_url_request_context.socket_factory(). 2492 spdy_url_request_context.socket_factory().
2496 AddSocketDataProvider(&data2); 2493 AddSocketDataProvider(&data2);
2497 2494
2498 d.set_quit_on_redirect(true); 2495 d.set_quit_on_redirect(true);
2499 r->Start(); 2496 r->Start();
2500 base::RunLoop().Run(); 2497 base::RunLoop().Run();
2501 2498
2502 EXPECT_EQ(1, d.received_redirect_count()); 2499 EXPECT_EQ(1, d.received_redirect_count());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 writes2, arraysize(writes2)); 2570 writes2, arraysize(writes2));
2574 2571
2575 // TODO(erikchen): Make test support SPDYSSL, SPDYNPN 2572 // TODO(erikchen): Make test support SPDYSSL, SPDYNPN
2576 TestDelegate d; 2573 TestDelegate d;
2577 TestDelegate d2; 2574 TestDelegate d2;
2578 SpdyURLRequestContext spdy_url_request_context( 2575 SpdyURLRequestContext spdy_url_request_context(
2579 GetParam().protocol, 2576 GetParam().protocol,
2580 false /* force_spdy_over_ssl*/, 2577 false /* force_spdy_over_ssl*/,
2581 true /* force_spdy_always */); 2578 true /* force_spdy_always */);
2582 { 2579 {
2583 scoped_ptr<URLRequest> r( 2580 scoped_ptr<URLRequest> r(spdy_url_request_context.CreateRequest(
2584 spdy_url_request_context.CreateRequest(GURL("http://www.google.com/"), 2581 GURL("http://www.google.com/"), DEFAULT_PRIORITY, &d));
2585 DEFAULT_PRIORITY,
2586 &d,
2587 NULL));
2588 spdy_url_request_context.socket_factory(). 2582 spdy_url_request_context.socket_factory().
2589 AddSocketDataProvider(&data); 2583 AddSocketDataProvider(&data);
2590 2584
2591 r->Start(); 2585 r->Start();
2592 base::RunLoop().Run(); 2586 base::RunLoop().Run();
2593 2587
2594 EXPECT_EQ(0, d.received_redirect_count()); 2588 EXPECT_EQ(0, d.received_redirect_count());
2595 std::string contents("hello!"); 2589 std::string contents("hello!");
2596 EXPECT_EQ(contents, d.data_received()); 2590 EXPECT_EQ(contents, d.data_received());
2597 2591
2598 scoped_ptr<URLRequest> r2( 2592 scoped_ptr<URLRequest> r2(spdy_url_request_context.CreateRequest(
2599 spdy_url_request_context.CreateRequest( 2593 GURL("http://www.google.com/foo.dat"), DEFAULT_PRIORITY, &d2));
2600 GURL("http://www.google.com/foo.dat"),
2601 DEFAULT_PRIORITY,
2602 &d2,
2603 NULL));
2604 spdy_url_request_context.socket_factory(). 2594 spdy_url_request_context.socket_factory().
2605 AddSocketDataProvider(&data2); 2595 AddSocketDataProvider(&data2);
2606 2596
2607 d2.set_quit_on_redirect(true); 2597 d2.set_quit_on_redirect(true);
2608 r2->Start(); 2598 r2->Start();
2609 base::RunLoop().Run(); 2599 base::RunLoop().Run();
2610 EXPECT_EQ(1, d2.received_redirect_count()); 2600 EXPECT_EQ(1, d2.received_redirect_count());
2611 2601
2612 r2->FollowDeferredRedirect(); 2602 r2->FollowDeferredRedirect();
2613 base::RunLoop().Run(); 2603 base::RunLoop().Run();
(...skipping 4205 matching lines...) Expand 10 before | Expand all | Expand 10 after
6819 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6809 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6820 scoped_ptr<SSLSocketDataProvider> ssl_provider( 6810 scoped_ptr<SSLSocketDataProvider> ssl_provider(
6821 new SSLSocketDataProvider(ASYNC, OK)); 6811 new SSLSocketDataProvider(ASYNC, OK));
6822 // Set to TLS_RSA_WITH_NULL_MD5 6812 // Set to TLS_RSA_WITH_NULL_MD5
6823 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6813 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6824 6814
6825 RunTLSUsageCheckTest(ssl_provider.Pass()); 6815 RunTLSUsageCheckTest(ssl_provider.Pass());
6826 } 6816 }
6827 6817
6828 } // namespace net 6818 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698