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

Side by Side Diff: net/socket/deterministic_socket_data_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
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/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 : sock_(NULL), 70 : sock_(NULL),
71 data_(NULL), 71 data_(NULL),
72 read_buf_(NULL), 72 read_buf_(NULL),
73 connect_data_(SYNCHRONOUS, OK), 73 connect_data_(SYNCHRONOUS, OK),
74 endpoint_("www.google.com", 443), 74 endpoint_("www.google.com", 443),
75 tcp_params_(new TransportSocketParams(endpoint_, 75 tcp_params_(new TransportSocketParams(endpoint_,
76 LOWEST, 76 LOWEST,
77 false, 77 false,
78 false, 78 false,
79 OnHostResolutionCallback())), 79 OnHostResolutionCallback())),
80 histograms_(""), 80 histograms_(std::string()),
81 socket_pool_(10, 10, &histograms_, &socket_factory_) { 81 socket_pool_(10, 10, &histograms_, &socket_factory_) {}
82 }
83 82
84 void DeterministicSocketDataTest::TearDown() { 83 void DeterministicSocketDataTest::TearDown() {
85 // Empty the current queue. 84 // Empty the current queue.
86 MessageLoop::current()->RunUntilIdle(); 85 MessageLoop::current()->RunUntilIdle();
87 PlatformTest::TearDown(); 86 PlatformTest::TearDown();
88 } 87 }
89 88
90 void DeterministicSocketDataTest::Initialize(MockRead* reads, 89 void DeterministicSocketDataTest::Initialize(MockRead* reads,
91 size_t reads_count, 90 size_t reads_count,
92 MockWrite* writes, 91 MockWrite* writes,
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 data_->StopAfter(1); 595 data_->StopAfter(1);
597 AssertSyncWriteEquals(kMsg3, kLen3); 596 AssertSyncWriteEquals(kMsg3, kLen3);
598 597
599 data_->RunFor(1); 598 data_->RunFor(1);
600 ASSERT_TRUE(read_callback_.have_result()); 599 ASSERT_TRUE(read_callback_.have_result());
601 ASSERT_EQ(kLen2, read_callback_.WaitForResult()); 600 ASSERT_EQ(kLen2, read_callback_.WaitForResult());
602 AssertReadBufferEquals(kMsg2, kLen2); 601 AssertReadBufferEquals(kMsg2, kLen2);
603 } 602 }
604 603
605 } // namespace net 604 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/ssl_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698