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

Unified Diff: sync/util/cryptographer_unittest.cc

Issue 10878015: [Sync] Move keystore key handling to SyncEncryptionHandlerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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 | « sync/util/cryptographer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/util/cryptographer_unittest.cc
diff --git a/sync/util/cryptographer_unittest.cc b/sync/util/cryptographer_unittest.cc
index 09fb63fec0662022eb0fd28bad0f703e5d0ba118..1e06b868b7234582c10e0bcc35d71945d1add169 100644
--- a/sync/util/cryptographer_unittest.cc
+++ b/sync/util/cryptographer_unittest.cc
@@ -138,19 +138,6 @@ TEST_F(SyncCryptographerTest, AddKeySetsDefault) {
EXPECT_EQ(encrypted3.key_name(), encrypted4.key_name());
}
-// Ensure setting the keystore key works and doesn't modify the default nigori.
-TEST_F(SyncCryptographerTest, SetKeystore) {
- EXPECT_FALSE(cryptographer_.is_initialized());
- EXPECT_FALSE(cryptographer_.HasKeystoreKey());
-
- EXPECT_FALSE(cryptographer_.SetKeystoreKey(""));
- EXPECT_FALSE(cryptographer_.HasKeystoreKey());
-
- EXPECT_TRUE(cryptographer_.SetKeystoreKey("keystore_key"));
- EXPECT_TRUE(cryptographer_.HasKeystoreKey());
- EXPECT_FALSE(cryptographer_.is_initialized());
-}
-
// Crashes, Bug 55178.
#if defined(OS_WIN)
#define MAYBE_EncryptExportDecrypt DISABLED_EncryptExportDecrypt
@@ -224,22 +211,4 @@ TEST_F(SyncCryptographerTest, MAYBE_PackUnpack) {
EXPECT_EQ(expected_mac, mac_key);
}
-// Test that bootstrapping the keystore key works and doesn't affect the default
-// nigori.
-TEST_F(SyncCryptographerTest, BootstrapKeystore) {
- std::string token;
- cryptographer_.GetKeystoreKeyBootstrapToken(&token);
- EXPECT_TRUE(token.empty());
-
- cryptographer_.SetKeystoreKey("keystore_key");
- cryptographer_.GetKeystoreKeyBootstrapToken(&token);
- EXPECT_FALSE(token.empty());
-
- Cryptographer cryptographer2(&encryptor_);
- EXPECT_FALSE(cryptographer2.HasKeystoreKey());
- cryptographer2.BootstrapKeystoreKey(token);
- EXPECT_TRUE(cryptographer2.HasKeystoreKey());
- EXPECT_FALSE(cryptographer2.is_initialized());
-}
-
} // namespace syncer
« no previous file with comments | « sync/util/cryptographer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698