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

Unified Diff: sync/util/cryptographer_unittest.cc

Issue 10855037: [Sync] Add history delete directive type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 2 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/syncable/model_type.cc ('k') | sync/util/data_type_histogram.h » ('j') | 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 9d1b23646328a9d713d5575dbb8b1468a7d5a996..1541d362ec266e7fa9419874bac62ba2d93d3a6b 100644
--- a/sync/util/cryptographer_unittest.cc
+++ b/sync/util/cryptographer_unittest.cc
@@ -21,15 +21,15 @@ using ::testing::_;
} // namespace
-class SyncCryptographerTest : public ::testing::Test {
+class CryptographerTest : public ::testing::Test {
protected:
- SyncCryptographerTest() : cryptographer_(&encryptor_) {}
+ CryptographerTest() : cryptographer_(&encryptor_) {}
FakeEncryptor encryptor_;
Cryptographer cryptographer_;
};
-TEST_F(SyncCryptographerTest, EmptyCantDecrypt) {
+TEST_F(CryptographerTest, EmptyCantDecrypt) {
EXPECT_FALSE(cryptographer_.is_ready());
sync_pb::EncryptedData encrypted;
@@ -39,7 +39,7 @@ TEST_F(SyncCryptographerTest, EmptyCantDecrypt) {
EXPECT_FALSE(cryptographer_.CanDecrypt(encrypted));
}
-TEST_F(SyncCryptographerTest, EmptyCantEncrypt) {
+TEST_F(CryptographerTest, EmptyCantEncrypt) {
EXPECT_FALSE(cryptographer_.is_ready());
sync_pb::EncryptedData encrypted;
@@ -47,7 +47,7 @@ TEST_F(SyncCryptographerTest, EmptyCantEncrypt) {
EXPECT_FALSE(cryptographer_.Encrypt(original, &encrypted));
}
-TEST_F(SyncCryptographerTest, MissingCantDecrypt) {
+TEST_F(CryptographerTest, MissingCantDecrypt) {
KeyParams params = {"localhost", "dummy", "dummy"};
cryptographer_.AddKey(params);
EXPECT_TRUE(cryptographer_.is_ready());
@@ -59,7 +59,7 @@ TEST_F(SyncCryptographerTest, MissingCantDecrypt) {
EXPECT_FALSE(cryptographer_.CanDecrypt(encrypted));
}
-TEST_F(SyncCryptographerTest, CanEncryptAndDecrypt) {
+TEST_F(CryptographerTest, CanEncryptAndDecrypt) {
KeyParams params = {"localhost", "dummy", "dummy"};
EXPECT_TRUE(cryptographer_.AddKey(params));
EXPECT_TRUE(cryptographer_.is_ready());
@@ -78,7 +78,7 @@ TEST_F(SyncCryptographerTest, CanEncryptAndDecrypt) {
EXPECT_EQ(original.SerializeAsString(), decrypted.SerializeAsString());
}
-TEST_F(SyncCryptographerTest, EncryptOnlyIfDifferent) {
+TEST_F(CryptographerTest, EncryptOnlyIfDifferent) {
KeyParams params = {"localhost", "dummy", "dummy"};
EXPECT_TRUE(cryptographer_.AddKey(params));
EXPECT_TRUE(cryptographer_.is_ready());
@@ -109,7 +109,7 @@ TEST_F(SyncCryptographerTest, EncryptOnlyIfDifferent) {
EXPECT_EQ(original.SerializeAsString(), decrypted.SerializeAsString());
}
-TEST_F(SyncCryptographerTest, AddKeySetsDefault) {
+TEST_F(CryptographerTest, AddKeySetsDefault) {
KeyParams params1 = {"localhost", "dummy", "dummy1"};
EXPECT_TRUE(cryptographer_.AddKey(params1));
EXPECT_TRUE(cryptographer_.is_ready());
@@ -144,7 +144,7 @@ TEST_F(SyncCryptographerTest, AddKeySetsDefault) {
#else
#define MAYBE_EncryptExportDecrypt EncryptExportDecrypt
#endif
-TEST_F(SyncCryptographerTest, MAYBE_EncryptExportDecrypt) {
+TEST_F(CryptographerTest, MAYBE_EncryptExportDecrypt) {
sync_pb::EncryptedData nigori;
sync_pb::EncryptedData encrypted;
@@ -183,7 +183,7 @@ TEST_F(SyncCryptographerTest, MAYBE_EncryptExportDecrypt) {
}
}
-TEST_F(SyncCryptographerTest, Bootstrap) {
+TEST_F(CryptographerTest, Bootstrap) {
KeyParams params = {"localhost", "dummy", "dummy"};
cryptographer_.AddKey(params);
« no previous file with comments | « sync/syncable/model_type.cc ('k') | sync/util/data_type_histogram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698