Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1761)

Unified Diff: chrome/browser/metrics/variations/variations_seed_store_unittest.cc

Issue 414883002: Fix VariationsSeedStoreTest.VerifySeedSignature in the OpenSSL build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: histograms.xml Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/variations/variations_seed_store_unittest.cc
diff --git a/chrome/browser/metrics/variations/variations_seed_store_unittest.cc b/chrome/browser/metrics/variations/variations_seed_store_unittest.cc
index 9612fe69b339609063b56fbb55e6e2da2fcc3608..7d295f191a53dd692dfd641a3b2502676f2b5548 100644
--- a/chrome/browser/metrics/variations/variations_seed_store_unittest.cc
+++ b/chrome/browser/metrics/variations/variations_seed_store_unittest.cc
@@ -204,8 +204,15 @@ TEST(VariationsSeedStoreTest, VerifySeedSignature) {
seed_store.VerifySeedSignature(seed_data, seed_data));
// Using a different signature (e.g. the base64 seed data) should fail.
+#if defined(USE_OPENSSL)
+ // OpenSSL doesn't distinguish signature decode failure from the
+ // signature not matching.
+ EXPECT_EQ(VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_INVALID_SEED,
+ seed_store.VerifySeedSignature(seed_data, base64_seed_data));
+#else
EXPECT_EQ(VariationsSeedStore::VARIATIONS_SEED_SIGNATURE_INVALID_SIGNATURE,
seed_store.VerifySeedSignature(seed_data, base64_seed_data));
+#endif
// Using a different seed should not match the signature.
seed_data[0] = 'x';
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698