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

Unified Diff: net/base/host_resolver_impl_unittest.cc

Issue 1615005: Flush socket pools and SPDY session pool properly on explicit requests and network changes. (Closed)
Patch Set: Fix minor leak. Created 10 years, 8 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/base/host_resolver_impl.cc ('k') | net/base/mapped_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl_unittest.cc
diff --git a/net/base/host_resolver_impl_unittest.cc b/net/base/host_resolver_impl_unittest.cc
index bd19f0b87e046db4c04ed4976ac82055729af743..e439491d3aa120b8310d4021a7e7e65048ffbf40 100644
--- a/net/base/host_resolver_impl_unittest.cc
+++ b/net/base/host_resolver_impl_unittest.cc
@@ -1039,38 +1039,6 @@ TEST_F(HostResolverImplTest, CancellationObserver) {
CapturingObserver::StartOrCancelEntry(1, info));
}
-// Test that IP address changes flush the cache.
-TEST_F(HostResolverImplTest, FlushCacheOnIPAddressChange) {
- MockNetworkChangeNotifier mock_network_change_notifier;
- scoped_refptr<HostResolver> host_resolver(
- new HostResolverImpl(NULL, CreateDefaultCache(),
- &mock_network_change_notifier,
- kMaxJobs));
-
- AddressList addrlist;
-
- // Resolve "host1".
- HostResolver::RequestInfo info1("host1", 70);
- TestCompletionCallback callback;
- int rv = host_resolver->Resolve(info1, &addrlist, &callback, NULL, NULL);
- EXPECT_EQ(ERR_IO_PENDING, rv);
- EXPECT_EQ(OK, callback.WaitForResult());
-
- // Resolve "host1" again -- this time it will be served from cache, but it
- // should still notify of completion.
- rv = host_resolver->Resolve(info1, &addrlist, &callback, NULL, NULL);
- ASSERT_EQ(OK, rv); // Should complete synchronously.
-
- // Flush cache by triggering an IP address change.
- mock_network_change_notifier.NotifyIPAddressChange();
-
- // Resolve "host1" again -- this time it won't be served from cache, so it
- // will complete asynchronously.
- rv = host_resolver->Resolve(info1, &addrlist, &callback, NULL, NULL);
- ASSERT_EQ(ERR_IO_PENDING, rv); // Should complete asynchronously.
- EXPECT_EQ(OK, callback.WaitForResult());
-}
-
// Tests that when the maximum threads is set to 1, requests are dequeued
// in order of priority.
TEST_F(HostResolverImplTest, HigherPriorityRequestsStartedFirst) {
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/base/mapped_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698