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

Side by Side Diff: components/cronet/stale_host_resolver_unittest.cc

Issue 2274123002: Make ~StaleHostResolverTest override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/cronet/stale_host_resolver.h" 5 #include "components/cronet/stale_host_resolver.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }; 72 };
73 73
74 class StaleHostResolverTest : public testing::Test { 74 class StaleHostResolverTest : public testing::Test {
75 protected: 75 protected:
76 StaleHostResolverTest() 76 StaleHostResolverTest()
77 : mock_proc_(new MockHostResolverProc()), 77 : mock_proc_(new MockHostResolverProc()),
78 resolver_(nullptr), 78 resolver_(nullptr),
79 resolve_pending_(false), 79 resolve_pending_(false),
80 resolve_complete_(false) {} 80 resolve_complete_(false) {}
81 81
82 ~StaleHostResolverTest() {} 82 ~StaleHostResolverTest() override {}
83 83
84 void SetStaleDelay(int stale_delay_sec) { 84 void SetStaleDelay(int stale_delay_sec) {
85 DCHECK(!resolver_); 85 DCHECK(!resolver_);
86 86
87 options_.delay = base::TimeDelta::FromSeconds(stale_delay_sec); 87 options_.delay = base::TimeDelta::FromSeconds(stale_delay_sec);
88 } 88 }
89 89
90 void SetStaleUsability(int max_expired_time_sec, 90 void SetStaleUsability(int max_expired_time_sec,
91 int max_stale_uses, 91 int max_stale_uses,
92 bool allow_other_network) { 92 bool allow_other_network) {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 EXPECT_TRUE(resolve_complete()); 489 EXPECT_TRUE(resolve_complete());
490 EXPECT_EQ(net::OK, resolve_error()); 490 EXPECT_EQ(net::OK, resolve_error());
491 EXPECT_EQ(1u, resolve_addresses().size()); 491 EXPECT_EQ(1u, resolve_addresses().size());
492 EXPECT_EQ(kCacheAddress, resolve_addresses()[0].ToStringWithoutPort()); 492 EXPECT_EQ(kCacheAddress, resolve_addresses()[0].ToStringWithoutPort());
493 } 493 }
494 494
495 } // namespace 495 } // namespace
496 496
497 } // namespace cronet 497 } // namespace cronet
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698