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

Unified Diff: net/dns/dns_test_util.cc

Issue 10442098: [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort addresses according to RFC3484. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Working AddressSorterWin + measurements. Created 8 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
Index: net/dns/dns_test_util.cc
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index 051f595e5a87df15c5b3806970690b9f06f03bdf..bae5fb1b701d252a659f013034e1fead8c08eb36 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -14,6 +14,7 @@
#include "net/base/dns_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
+#include "net/dns/address_sorter.h"
#include "net/dns/dns_client.h"
#include "net/dns/dns_config_service.h"
#include "net/dns/dns_protocol.h"
@@ -133,6 +134,15 @@ class MockTransactionFactory : public DnsTransactionFactory {
}
};
+class MockAddressSorter : public AddressSorter {
+ public:
+ virtual ~MockAddressSorter() {}
+ virtual bool Sort(AddressList* list) const OVERRIDE {
+ // Do nothing.
+ return true;
+ }
+};
+
// MockDnsClient provides MockTransactionFactory.
class MockDnsClient : public DnsClient {
public:
@@ -151,9 +161,14 @@ class MockDnsClient : public DnsClient {
return config_.IsValid() ? &factory_ : NULL;
}
+ virtual AddressSorter* GetAddressSorter() OVERRIDE {
+ return &address_sorter_;
+ }
+
private:
DnsConfig config_;
MockTransactionFactory factory_;
+ MockAddressSorter address_sorter_;
};
} // namespace
« net/dns/address_sorter_win.cc ('K') | « net/dns/dns_response.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698