Commit ea69a2c9 authored by Rob Percival's avatar Rob Percival Committed by Commit Bot

Remove a CHECK from single_tree_tracker_unittest.cc

CHECK should not be used in tests. This test uses a net::MockCachingHostResolver, so the HostCache
argument that was being checked should never be null.

Change-Id: Ibaa7051c404037089fb010a0ed11ee8775c70277
Reviewed-on: https://chromium-review.googlesource.com/823962Reviewed-by: default avatarRyan Sleevi <rsleevi@chromium.org>
Commit-Queue: Rob Percival <robpercival@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523779}
parent 578968d4
...@@ -174,10 +174,9 @@ void AddCacheEntry(net::HostCache* cache, ...@@ -174,10 +174,9 @@ void AddCacheEntry(net::HostCache* cache,
const std::string& hostname, const std::string& hostname,
net::HostCache::Entry::Source source, net::HostCache::Entry::Source source,
base::TimeDelta ttl) { base::TimeDelta ttl) {
CHECK(cache); cache->Set(net::HostCache::Key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0),
const net::HostCache::Key key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0); net::HostCache::Entry(net::OK, net::AddressList(), source),
const net::HostCache::Entry entry(net::OK, net::AddressList(), source); base::TimeTicks::Now(), ttl);
cache->Set(key, entry, base::TimeTicks::Now(), ttl);
} }
} // namespace } // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment