summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/dns_master_unittest.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 17:12:48 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 17:12:48 +0000
commitfadca57773a35311b287a159fb1e0e62e22d5ccc (patch)
tree7809e2b2d236b7f0d3e76d9928d457d96872eeef /chrome/browser/net/dns_master_unittest.cc
parent8568d97d7e4b58029613618e9dcd2c8771238be6 (diff)
downloadchromium_src-fadca57773a35311b287a159fb1e0e62e22d5ccc.zip
chromium_src-fadca57773a35311b287a159fb1e0e62e22d5ccc.tar.gz
chromium_src-fadca57773a35311b287a159fb1e0e62e22d5ccc.tar.bz2
Fix purify freeze. Revert "Use a priority queue to assure that subresources are resolved asap"
This reverts git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17605 0039d316-1c4b-4281-b951-d872f2087c98 TBR=jar Review URL: http://codereview.chromium.org/118239 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_master_unittest.cc')
-rw-r--r--chrome/browser/net/dns_master_unittest.cc63
1 files changed, 0 insertions, 63 deletions
diff --git a/chrome/browser/net/dns_master_unittest.cc b/chrome/browser/net/dns_master_unittest.cc
index b6805f5..2285229 100644
--- a/chrome/browser/net/dns_master_unittest.cc
+++ b/chrome/browser/net/dns_master_unittest.cc
@@ -541,67 +541,4 @@ TEST_F(DnsMasterTest, ReferrerSerializationTrimTest) {
master.Shutdown();
}
-
-TEST_F(DnsMasterTest, PriorityQueuePushPopTest) {
- DnsMaster::HostNameQueue queue;
-
- // First check high priority queue FIFO functionality.
- EXPECT_TRUE(queue.IsEmpty());
- queue.Push("a", DnsHostInfo::LEARNED_REFERAL_MOTIVATED);
- EXPECT_FALSE(queue.IsEmpty());
- queue.Push("b", DnsHostInfo::MOUSE_OVER_MOTIVATED);
- EXPECT_FALSE(queue.IsEmpty());
- EXPECT_EQ(queue.Pop(), "a");
- EXPECT_FALSE(queue.IsEmpty());
- EXPECT_EQ(queue.Pop(), "b");
- EXPECT_TRUE(queue.IsEmpty());
-
- // Then check low priority queue FIFO functionality.
- queue.IsEmpty();
- queue.Push("a", DnsHostInfo::PAGE_SCAN_MOTIVATED);
- EXPECT_FALSE(queue.IsEmpty());
- queue.Push("b", DnsHostInfo::OMNIBOX_MOTIVATED);
- EXPECT_FALSE(queue.IsEmpty());
- EXPECT_EQ(queue.Pop(), "a");
- EXPECT_FALSE(queue.IsEmpty());
- EXPECT_EQ(queue.Pop(), "b");
- EXPECT_TRUE(queue.IsEmpty());
-}
-
-TEST_F(DnsMasterTest, PriorityQueueReorderTest) {
- DnsMaster::HostNameQueue queue;
-
- // Push all the low priority items.
- EXPECT_TRUE(queue.IsEmpty());
- queue.Push("scan", DnsHostInfo::PAGE_SCAN_MOTIVATED);
- queue.Push("unit", DnsHostInfo::UNIT_TEST_MOTIVATED);
- queue.Push("lmax", DnsHostInfo::LINKED_MAX_MOTIVATED);
- queue.Push("omni", DnsHostInfo::OMNIBOX_MOTIVATED);
- queue.Push("startup", DnsHostInfo::STARTUP_LIST_MOTIVATED);
- queue.Push("omni", DnsHostInfo::OMNIBOX_MOTIVATED);
-
- // Push all the high prority items
- queue.Push("learned", DnsHostInfo::LEARNED_REFERAL_MOTIVATED);
- queue.Push("refer", DnsHostInfo::STATIC_REFERAL_MOTIVATED);
- queue.Push("mouse", DnsHostInfo::MOUSE_OVER_MOTIVATED);
-
- // Check that high priority stuff comes out first, and in FIFO order.
- EXPECT_EQ(queue.Pop(), "learned");
- EXPECT_EQ(queue.Pop(), "refer");
- EXPECT_EQ(queue.Pop(), "mouse");
-
- // ...and then low priority strings.
- EXPECT_EQ(queue.Pop(), "scan");
- EXPECT_EQ(queue.Pop(), "unit");
- EXPECT_EQ(queue.Pop(), "lmax");
- EXPECT_EQ(queue.Pop(), "omni");
- EXPECT_EQ(queue.Pop(), "startup");
- EXPECT_EQ(queue.Pop(), "omni");
-
- EXPECT_TRUE(queue.IsEmpty());
-}
-
-
-
-
} // namespace chrome_browser_net