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

Unified Diff: net/base/dns_response_unittest.cc

Issue 7276014: DnsQuery: changed raw function pointer to callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« net/base/dns_query_unittest.cc ('K') | « net/base/dns_query_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/dns_response_unittest.cc
diff --git a/net/base/dns_response_unittest.cc b/net/base/dns_response_unittest.cc
index 470fe6333617d632eae087e1b373de378f5d660f..a62f56bf49609aff98f6d09b6603b1979a205cb3 100644
--- a/net/base/dns_response_unittest.cc
+++ b/net/base/dns_response_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind.h"
#include "base/rand_util.h"
#include "net/base/dns_response.h"
willchan no longer on Chromium 2011/06/28 09:58:23 This header should go first.
agayev 2011/06/28 14:37:24 Done.
#include "net/base/dns_util.h"
@@ -70,8 +71,9 @@ namespace net {
// TODO(agayev): add more thorough tests.
TEST(DnsResponseTest, ResponseWithCnameA) {
const std::string kHostnameDns("\012codereview\010chromium\003org", 25);
+ base::RandIntCallback rand_int_cb = base::Bind(&base::RandInt);
- DnsQuery q1(kHostnameDns, kDNS_A, base::RandUint64);
+ DnsQuery q1(kHostnameDns, kDNS_A, rand_int_cb);
uint8 id_hi = q1.id() >> 8, id_lo = q1.id() & 0xff;
uint8 ip[] = { // codereview.chromium.org resolves to
« net/base/dns_query_unittest.cc ('K') | « net/base/dns_query_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698