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

Unified Diff: net/dns/address_sorter_unittest.cc

Issue 10855163: Revert 151586 - [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort addresses according to RF… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/address_sorter_posix_unittest.cc ('k') | net/dns/address_sorter_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/address_sorter_unittest.cc
===================================================================
--- net/dns/address_sorter_unittest.cc (revision 151600)
+++ net/dns/address_sorter_unittest.cc (working copy)
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/dns/address_sorter.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "net/base/address_list.h"
-#include "net/base/net_util.h"
-#include "net/base/test_completion_callback.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace net {
-namespace {
-
-IPEndPoint MakeEndPoint(const std::string& str) {
- IPAddressNumber addr;
- CHECK(ParseIPLiteralToNumber(str, &addr));
- return IPEndPoint(addr, 0);
-}
-
-void OnSortComplete(AddressList* result_buf,
- const CompletionCallback& callback,
- bool success,
- const AddressList& result) {
- EXPECT_TRUE(success);
- if (success)
- *result_buf = result;
- callback.Run(OK);
-}
-
-TEST(AddressSorterTest, Sort) {
- scoped_ptr<AddressSorter> sorter(AddressSorter::CreateAddressSorter());
- AddressList list;
- list.push_back(MakeEndPoint("10.0.0.1"));
- list.push_back(MakeEndPoint("8.8.8.8"));
- list.push_back(MakeEndPoint("::1"));
- list.push_back(MakeEndPoint("2001:4860:4860::8888"));
-
- AddressList result;
- TestCompletionCallback callback;
- sorter->Sort(list, base::Bind(&OnSortComplete, &result,
- callback.callback()));
- callback.WaitForResult();
-}
-
-} // namespace
-} // namespace net
« no previous file with comments | « net/dns/address_sorter_posix_unittest.cc ('k') | net/dns/address_sorter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698