diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-18 12:56:04 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-18 12:56:04 +0000 |
commit | 89892f43df8199c81c00a632e427abb5a3ec68fd (patch) | |
tree | e2fb8073907fa71cea67f81b8852abe727749841 /chrome | |
parent | ed6fc35b8cac0a19a1c4455189ac648eeef19f94 (diff) | |
download | chromium_src-89892f43df8199c81c00a632e427abb5a3ec68fd.zip chromium_src-89892f43df8199c81c00a632e427abb5a3ec68fd.tar.gz chromium_src-89892f43df8199c81c00a632e427abb5a3ec68fd.tar.bz2 |
Enable safe browsing tests exercising VerifyMAC. Reorder libraries to match the dependency order required on Posix.
Patch from Pawel Hajdan Jr.
Review URL: http://codereview.chromium.org/3143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/SConscript.unit_tests | 7 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/protocol_parser_unittest.cc | 7 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_util.cc | 5 |
3 files changed, 5 insertions, 14 deletions
diff --git a/chrome/SConscript.unit_tests b/chrome/SConscript.unit_tests index f5fd0d0..1df2231 100644 --- a/chrome/SConscript.unit_tests +++ b/chrome/SConscript.unit_tests @@ -30,10 +30,14 @@ env_test.Prepend( 'CHROME_PNG_WRITE_SUPPORT', 'UNIT_TEST', ], + + # On Linux, dependencies must come after the libraries that depend on it. + # base must come after net, bzip2 must come before base, etc. LIBS = [ + 'net', + 'bzip2', 'base', 'base_gfx', - 'bzip2', 'googleurl', 'gtest', 'icuuc', @@ -42,7 +46,6 @@ env_test.Prepend( 'libxml', 'libxslt', 'modp_b64', - 'net', 'skia', 'v8', 'zlib', diff --git a/chrome/browser/safe_browsing/protocol_parser_unittest.cc b/chrome/browser/safe_browsing/protocol_parser_unittest.cc index b05af83..f371b6b 100644 --- a/chrome/browser/safe_browsing/protocol_parser_unittest.cc +++ b/chrome/browser/safe_browsing/protocol_parser_unittest.cc @@ -455,8 +455,6 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHash) { EXPECT_EQ(full_hashes[2].list_name, "goog-malware-shavar"); } -// TODO(port): Enable when we have ported VerifyMAC in safe_browsing_util.cc. -#if defined(OS_WIN) TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithMac) { const unsigned char get_hash[] = { 0x32, 0x56, 0x74, 0x6f, 0x6b, 0x36, 0x64, 0x41, @@ -492,8 +490,6 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithMac) { EXPECT_EQ(full_hashes.size(), static_cast<size_t>(1)); EXPECT_EQ(memcmp(hash_result, &full_hashes[0].hash, sizeof(SBFullHash)), 0); } -#endif // defined(OS_WIN) - TEST(SafeBrowsingProtocolParsingTest, TestFormatHash) { SafeBrowsingProtocolParser parser; @@ -555,8 +551,6 @@ TEST(SafeBrowsingProtocolParsingTest, TestReset) { EXPECT_TRUE(reset); } -// TODO(port): Enable when we have ported VerifyMAC in safe_browsing_util.cc. -#if defined(OS_WIN) TEST(SafeBrowsingProtocolParsingTest, TestVerifyUpdateMac) { SafeBrowsingProtocolParser parser; @@ -615,4 +609,3 @@ TEST(SafeBrowsingProtocolParsingTest, TestVerifyChunkMac) { safe_browsing_util::FreeChunks(&chunks); } -#endif // defined(OS_WIN) diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc index 0096263..13409ed 100644 --- a/chrome/browser/safe_browsing/safe_browsing_util.cc +++ b/chrome/browser/safe_browsing/safe_browsing_util.cc @@ -137,11 +137,6 @@ static void DecodeWebSafe(std::string* decoded) { bool VerifyMAC(const std::string& key, const std::string& mac, const char* data, int data_length) { -#if !defined(OS_WIN) - // TODO(port): Remove #defines when linking issue with modp_b64 is resolved. - NOTIMPLEMENTED(); - return false; -#endif std::string key_copy = key; DecodeWebSafe(&key_copy); std::string decoded_key; |