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

Unified Diff: components/sync/base/nigori_unittest.cc

Issue 2813453004: [sync] Fix decryption failure caused by missing user_key (Closed)
Patch Set: [sync] Fix decryption failure caused by missing user_key Created 3 years, 8 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
Index: components/sync/base/nigori_unittest.cc
diff --git a/components/sync/base/nigori_unittest.cc b/components/sync/base/nigori_unittest.cc
index 09bbcd75a4039044752a160cee2b5edcaea56335..afa8466de56c4fdd5757b24b7b8dedf99d028c75 100644
--- a/components/sync/base/nigori_unittest.cc
+++ b/components/sync/base/nigori_unittest.cc
@@ -126,12 +126,13 @@ TEST(SyncNigoriTest, ExportImport) {
Nigori nigori1;
EXPECT_TRUE(nigori1.InitByDerivation("example.com", "username", "password"));
+ std::string user_key;
std::string encryption_key;
std::string mac_key;
- EXPECT_TRUE(nigori1.ExportKeys(&encryption_key, &mac_key));
+ EXPECT_TRUE(nigori1.ExportKeys(&user_key, &encryption_key, &mac_key));
Nigori nigori2;
- EXPECT_TRUE(nigori2.InitByImport(encryption_key, mac_key));
+ EXPECT_TRUE(nigori2.InitByImport(user_key, encryption_key, mac_key));
std::string original("test");
std::string plaintext;

Powered by Google App Engine
This is Rietveld 408576698