From f2db5208f66b3c6b47ce2cfb96aac1104e5f5cce Mon Sep 17 00:00:00 2001 From: "jar@chromium.org" Date: Sat, 31 Jan 2009 05:11:50 +0000 Subject: Remove DNS pre-resolution model of OS cache Force OS to decide about doing network lookup, rather than guessing whether it is in the cache before asking the OS. This will cost more OS operations, but should roughly double the hit rate for scan based pre-resolution. r=mbelshe Review URL: http://codereview.chromium.org/19524 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9017 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/net/dns_host_info_unittest.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'chrome/browser/net/dns_host_info_unittest.cc') diff --git a/chrome/browser/net/dns_host_info_unittest.cc b/chrome/browser/net/dns_host_info_unittest.cc index 79cca93..c279804 100644 --- a/chrome/browser/net/dns_host_info_unittest.cc +++ b/chrome/browser/net/dns_host_info_unittest.cc @@ -57,13 +57,8 @@ TEST(DnsHostInfoTest, StateChangeTest) { info.set_cache_expiration(TimeDelta::FromMilliseconds(300)); EXPECT_FALSE(info.NeedsDnsUpdate(hostname1)) << "expiration time not honored"; - // Note that we'll actually get an expiration (effectively) of - // 150ms, since there was no detected network activity time during lookup. - PlatformThread::Sleep(80); // Not enough time to pass our 150ms mark. + PlatformThread::Sleep(80); // Not enough time to pass our 300ms mark. EXPECT_FALSE(info.NeedsDnsUpdate(hostname1)) << "expiration time not honored"; - // Be sure we sleep (80+100) enough to pass that 150ms mark. - PlatformThread::Sleep(100); - EXPECT_TRUE(info.NeedsDnsUpdate(hostname1)) << "expiration time not honored"; // That was a nice life when the object was found.... but next time it won't // be found. We'll sleep for a while, and then come back with not-found. -- cgit v1.1