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

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

Issue 12518036: net: move host_resolver files from net/base to net/dns (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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/base/single_request_host_resolver.h" 5 #include "net/dns/single_request_host_resolver.h"
6 6
7 #include "net/base/address_list.h" 7 #include "net/base/address_list.h"
8 #include "net/base/mock_host_resolver.h"
9 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
10 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
11 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
11 #include "net/dns/mock_host_resolver.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 namespace { 16 namespace {
17 17
18 // Helper class used by SingleRequestHostResolverTest.Cancel test. 18 // Helper class used by SingleRequestHostResolverTest.Cancel test.
19 // It checks that only one request is outstanding at a time, and that 19 // It checks that only one request is outstanding at a time, and that
20 // it is cancelled before the class is destroyed. 20 // it is cancelled before the class is destroyed.
21 class HangingHostResolver : public HostResolver { 21 class HangingHostResolver : public HostResolver {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 SingleRequestHostResolver single_request_resolver(&resolver); 115 SingleRequestHostResolver single_request_resolver(&resolver);
116 single_request_resolver.Cancel(); 116 single_request_resolver.Cancel();
117 117
118 // To pass, HangingHostResolver should not have received a cancellation 118 // To pass, HangingHostResolver should not have received a cancellation
119 // request (since there is nothing to cancel). If it does, it will crash. 119 // request (since there is nothing to cancel). If it does, it will crash.
120 } 120 }
121 121
122 } // namespace 122 } // namespace
123 123
124 } // namespace net 124 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698