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

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

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/dns/dns_socket_pool.cc ('k') | net/ftp/ftp_network_transaction.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_transaction.h" 5 #include "net/dns/dns_transaction.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 scoped_ptr<DnsTransaction> transaction_; 323 scoped_ptr<DnsTransaction> transaction_;
324 int expected_answer_count_; 324 int expected_answer_count_;
325 bool cancel_in_callback_; 325 bool cancel_in_callback_;
326 bool quit_in_callback_; 326 bool quit_in_callback_;
327 327
328 bool completed_; 328 bool completed_;
329 }; 329 };
330 330
331 class DnsTransactionTest : public testing::Test { 331 class DnsTransactionTest : public testing::Test {
332 public: 332 public:
333 DnsTransactionTest() : socket_factory_(NULL) {} 333 DnsTransactionTest() {}
334 334
335 // Generates |nameservers| for DnsConfig. 335 // Generates |nameservers| for DnsConfig.
336 void ConfigureNumServers(unsigned num_servers) { 336 void ConfigureNumServers(unsigned num_servers) {
337 CHECK_LE(num_servers, 255u); 337 CHECK_LE(num_servers, 255u);
338 config_.nameservers.clear(); 338 config_.nameservers.clear();
339 IPAddressNumber dns_ip; 339 IPAddressNumber dns_ip;
340 { 340 {
341 bool rv = ParseIPLiteralToNumber("192.168.1.0", &dns_ip); 341 bool rv = ParseIPLiteralToNumber("192.168.1.0", &dns_ip);
342 EXPECT_TRUE(rv); 342 EXPECT_TRUE(rv);
343 } 343 }
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 config_.timeout = TestTimeouts::tiny_timeout(); 936 config_.timeout = TestTimeouts::tiny_timeout();
937 ConfigureFactory(); 937 ConfigureFactory();
938 938
939 TransactionHelper helper0(".", dns_protocol::kTypeA, ERR_INVALID_ARGUMENT); 939 TransactionHelper helper0(".", dns_protocol::kTypeA, ERR_INVALID_ARGUMENT);
940 EXPECT_TRUE(helper0.Run(transaction_factory_.get())); 940 EXPECT_TRUE(helper0.Run(transaction_factory_.get()));
941 } 941 }
942 942
943 } // namespace 943 } // namespace
944 944
945 } // namespace net 945 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_socket_pool.cc ('k') | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698