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

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: Got rid of unnecessary include. 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
« no previous file with comments | « net/base/dns_query_unittest.cc ('k') | net/base/rand_callback.h » ('j') | 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..086dad313cf165ece0aac5c5898a207f326701ab 100644
--- a/net/base/dns_response_unittest.cc
+++ b/net/base/dns_response_unittest.cc
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/rand_util.h"
#include "net/base/dns_response.h"
+
+#include "base/bind.h"
+#include "base/rand_util.h"
#include "net/base/dns_util.h"
#include "net/base/net_errors.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -70,8 +72,9 @@ namespace net {
// TODO(agayev): add more thorough tests.
TEST(DnsResponseTest, ResponseWithCnameA) {
const std::string kHostnameDns("\012codereview\010chromium\003org", 25);
+ 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
« no previous file with comments | « net/base/dns_query_unittest.cc ('k') | net/base/rand_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698