diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-31 05:11:50 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-31 05:11:50 +0000 |
commit | f2db5208f66b3c6b47ce2cfb96aac1104e5f5cce (patch) | |
tree | 763a190cd9374dd2cb0f5d98333f2d51ac596e17 /chrome/browser/net/dns_host_info_unittest.cc | |
parent | a27808170ffd8b86d920bb5bbe497ffda29be796 (diff) | |
download | chromium_src-f2db5208f66b3c6b47ce2cfb96aac1104e5f5cce.zip chromium_src-f2db5208f66b3c6b47ce2cfb96aac1104e5f5cce.tar.gz chromium_src-f2db5208f66b3c6b47ce2cfb96aac1104e5f5cce.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/net/dns_host_info_unittest.cc')
-rw-r--r-- | chrome/browser/net/dns_host_info_unittest.cc | 7 |
1 files changed, 1 insertions, 6 deletions
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. |