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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_http_utils.cc ('k') | net/spdy/spdy_session_spdy3_unittest.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 "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "net/base/host_cache.h" 7 #include "net/base/host_cache.h"
8 #include "net/base/ip_endpoint.h" 8 #include "net/base/ip_endpoint.h"
9 #include "net/base/net_log_unittest.h" 9 #include "net/base/net_log_unittest.h"
10 #include "net/base/request_priority.h" 10 #include "net/base/request_priority.h"
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 }, 671 },
672 { "http://images.foo.com", 672 { "http://images.foo.com",
673 "images.foo.com", 673 "images.foo.com",
674 "192.168.0.4,192.168.0.3" 674 "192.168.0.4,192.168.0.3"
675 }, 675 },
676 }; 676 };
677 677
678 SpdySessionDependencies session_deps; 678 SpdySessionDependencies session_deps;
679 session_deps.host_resolver->set_synchronous_mode(true); 679 session_deps.host_resolver->set_synchronous_mode(true);
680 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) { 680 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_hosts); i++) {
681 session_deps.host_resolver->rules()->AddIPLiteralRule(test_hosts[i].name, 681 session_deps.host_resolver->rules()->AddIPLiteralRule(
682 test_hosts[i].iplist, ""); 682 test_hosts[i].name, test_hosts[i].iplist, std::string());
683 683
684 // This test requires that the HostResolver cache be populated. Normal 684 // This test requires that the HostResolver cache be populated. Normal
685 // code would have done this already, but we do it manually. 685 // code would have done this already, but we do it manually.
686 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort)); 686 HostResolver::RequestInfo info(HostPortPair(test_hosts[i].name, kTestPort));
687 session_deps.host_resolver->Resolve( 687 session_deps.host_resolver->Resolve(
688 info, &test_hosts[i].addresses, CompletionCallback(), NULL, 688 info, &test_hosts[i].addresses, CompletionCallback(), NULL,
689 BoundNetLog()); 689 BoundNetLog());
690 690
691 // Setup a HostPortProxyPair 691 // Setup a HostPortProxyPair
692 test_hosts[i].pair = HostPortProxyPair( 692 test_hosts[i].pair = HostPortProxyPair(
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 spdy_stream2->SetDelegate(&delegate2); 1132 spdy_stream2->SetDelegate(&delegate2);
1133 1133
1134 spdy_stream1->SendRequest(false); 1134 spdy_stream1->SendRequest(false);
1135 spdy_stream2->SendRequest(false); 1135 spdy_stream2->SendRequest(false);
1136 1136
1137 // Ensure that the streams have not yet been activated and assigned an id. 1137 // Ensure that the streams have not yet been activated and assigned an id.
1138 EXPECT_EQ(0u, spdy_stream1->stream_id()); 1138 EXPECT_EQ(0u, spdy_stream1->stream_id());
1139 EXPECT_EQ(0u, spdy_stream2->stream_id()); 1139 EXPECT_EQ(0u, spdy_stream2->stream_id());
1140 1140
1141 // Ensure we don't crash while closing the session. 1141 // Ensure we don't crash while closing the session.
1142 session->CloseSessionOnError(ERR_ABORTED, true, ""); 1142 session->CloseSessionOnError(ERR_ABORTED, true, std::string());
1143 1143
1144 EXPECT_TRUE(spdy_stream1->closed()); 1144 EXPECT_TRUE(spdy_stream1->closed());
1145 EXPECT_TRUE(spdy_stream2->closed()); 1145 EXPECT_TRUE(spdy_stream2->closed());
1146 1146
1147 spdy_stream1 = NULL; 1147 spdy_stream1 = NULL;
1148 spdy_stream2 = NULL; 1148 spdy_stream2 = NULL;
1149 } 1149 }
1150 1150
1151 TEST_F(SpdySessionSpdy2Test, VerifyDomainAuthentication) { 1151 TEST_F(SpdySessionSpdy2Test, VerifyDomainAuthentication) {
1152 session_deps_.host_resolver->set_synchronous_mode(true); 1152 session_deps_.host_resolver->set_synchronous_mode(true);
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 http_session_.get(), session.get(), test_host_port_pair_); 1573 http_session_.get(), session.get(), test_host_port_pair_);
1574 1574
1575 EXPECT_EQ(SpdySession::FLOW_CONTROL_NONE, session->flow_control_state()); 1575 EXPECT_EQ(SpdySession::FLOW_CONTROL_NONE, session->flow_control_state());
1576 EXPECT_EQ(kSpdyVersion2, session->buffered_spdy_framer_->protocol_version()); 1576 EXPECT_EQ(kSpdyVersion2, session->buffered_spdy_framer_->protocol_version());
1577 EXPECT_EQ(0, session->session_send_window_size_); 1577 EXPECT_EQ(0, session->session_send_window_size_);
1578 EXPECT_EQ(0, session->session_recv_window_size_); 1578 EXPECT_EQ(0, session->session_recv_window_size_);
1579 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_); 1579 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_);
1580 } 1580 }
1581 1581
1582 } // namespace net 1582 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_utils.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698