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

Side by Side Diff: net/dns/dns_session_unittest.cc

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « net/cert_net/nss_ocsp.cc ('k') | net/dns/dns_socket_pool.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/dns/dns_session.h" 5 #include "net/dns/dns_session.h"
6 6
7 #include <list> 7 #include <list>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // We're not actually expecting to send or receive any data, so use the 187 // We're not actually expecting to send or receive any data, so use the
188 // simplest SocketDataProvider with no data supplied. 188 // simplest SocketDataProvider with no data supplied.
189 SocketDataProvider* data_provider = new StaticSocketDataProvider(); 189 SocketDataProvider* data_provider = new StaticSocketDataProvider();
190 data_providers_.push_back(data_provider); 190 data_providers_.push_back(data_provider);
191 std::unique_ptr<MockUDPClientSocket> socket( 191 std::unique_ptr<MockUDPClientSocket> socket(
192 new MockUDPClientSocket(data_provider, net_log)); 192 new MockUDPClientSocket(data_provider, net_log));
193 return std::move(socket); 193 return std::move(socket);
194 } 194 }
195 195
196 TestClientSocketFactory::~TestClientSocketFactory() { 196 TestClientSocketFactory::~TestClientSocketFactory() {
197 STLDeleteElements(&data_providers_); 197 base::STLDeleteElements(&data_providers_);
198 } 198 }
199 199
200 TEST_F(DnsSessionTest, AllocateFree) { 200 TEST_F(DnsSessionTest, AllocateFree) {
201 std::unique_ptr<DnsSession::SocketLease> lease1, lease2; 201 std::unique_ptr<DnsSession::SocketLease> lease1, lease2;
202 202
203 Initialize(2); 203 Initialize(2);
204 EXPECT_TRUE(NoMoreEvents()); 204 EXPECT_TRUE(NoMoreEvents());
205 205
206 lease1 = Allocate(0); 206 lease1 = Allocate(0);
207 EXPECT_TRUE(DidAllocate(0)); 207 EXPECT_TRUE(DidAllocate(0));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 TEST_F(DnsSessionTest, HistogramTimeoutLong) { 241 TEST_F(DnsSessionTest, HistogramTimeoutLong) {
242 config_.timeout = base::TimeDelta::FromSeconds(15); 242 config_.timeout = base::TimeDelta::FromSeconds(15);
243 Initialize(2); 243 Initialize(2);
244 base::TimeDelta timeout = session_->NextTimeout(0, 0); 244 base::TimeDelta timeout = session_->NextTimeout(0, 0);
245 EXPECT_EQ(timeout.InMilliseconds(), config_.timeout.InMilliseconds()); 245 EXPECT_EQ(timeout.InMilliseconds(), config_.timeout.InMilliseconds());
246 } 246 }
247 247
248 } // namespace 248 } // namespace
249 249
250 } // namespace net 250 } // namespace net
OLDNEW
« no previous file with comments | « net/cert_net/nss_ocsp.cc ('k') | net/dns/dns_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698