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

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

Issue 2809853003: Revert of [sync] Fix decryption failure caused by missing user_key (Closed)
Patch Set: 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
« no previous file with comments | « components/sync/base/nigori.cc ('k') | components/sync/engine_impl/model_type_worker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/base/nigori_unittest.cc
diff --git a/components/sync/base/nigori_unittest.cc b/components/sync/base/nigori_unittest.cc
index 4dd0e22585a47257e8fd4c3e48d645f9fb74038b..09bbcd75a4039044752a160cee2b5edcaea56335 100644
--- a/components/sync/base/nigori_unittest.cc
+++ b/components/sync/base/nigori_unittest.cc
@@ -126,13 +126,12 @@
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(&user_key, &encryption_key, &mac_key));
+ EXPECT_TRUE(nigori1.ExportKeys(&encryption_key, &mac_key));
Nigori nigori2;
- EXPECT_TRUE(nigori2.InitByImport(user_key, encryption_key, mac_key));
+ EXPECT_TRUE(nigori2.InitByImport(encryption_key, mac_key));
std::string original("test");
std::string plaintext;
@@ -152,30 +151,5 @@
EXPECT_EQ(permuted1, permuted2);
}
-TEST(SyncNigoriTest, InitByDerivationSetsUserKey) {
- Nigori nigori;
- EXPECT_TRUE(nigori.InitByDerivation("example.com", "username", "password"));
-
- std::string user_key = "";
- std::string encryption_key;
- std::string mac_key;
- EXPECT_TRUE(nigori.ExportKeys(&user_key, &encryption_key, &mac_key));
-
- EXPECT_NE(user_key, "");
-}
-
-TEST(SyncNigoriTest, InitByImportToleratesEmptyUserKey) {
- 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(&user_key, &encryption_key, &mac_key));
-
- Nigori nigori2;
- EXPECT_TRUE(nigori2.InitByImport("", encryption_key, mac_key));
-}
-
} // anonymous namespace
} // namespace syncer
« no previous file with comments | « components/sync/base/nigori.cc ('k') | components/sync/engine_impl/model_type_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698