summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-06 00:54:58 +0000
committerpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-06 00:54:58 +0000
commit9b323e40ae67692745459f68920f5dab61aaaed3 (patch)
treeebf44e257d0cc79e9c236312ed060b9ae425f103 /chrome/browser/safe_browsing
parent338472af8c0b4ef1cf6257a7882a17cbee84a122 (diff)
downloadchromium_src-9b323e40ae67692745459f68920f5dab61aaaed3.zip
chromium_src-9b323e40ae67692745459f68920f5dab61aaaed3.tar.gz
chromium_src-9b323e40ae67692745459f68920f5dab61aaaed3.tar.bz2
Fix a memory leak introduced in the SafeBrowsing prefix cache test.
BUG=1484 Review URL: http://codereview.chromium.org/481 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 0b409ed..fe6f15c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -451,7 +451,11 @@ TEST(SafeBrowsing, HashCaching) {
EXPECT_EQ(full_hashes.size(), 1);
- // Testing prefix miss caching.
+ // Testing prefix miss caching. First, we clear out the existing database,
+ // Since PopulateDatabaseForCacheTest() doesn't handle adding duplicate
+ // chunks.
+ AddDelChunk(&database, "goog-malware-shavar", 1);
+
std::vector<SBPrefix> prefix_misses;
std::vector<SBFullHashResult> empty_full_hash;
prefix_misses.push_back(Sha256Prefix("http://www.bad.com/malware.html"));