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

Unified Diff: components/sync/core_impl/sync_manager_impl_unittest.cc

Issue 2279713002: Make PassphraseType a "enum class" instead of "enum". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix java Created 4 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
Index: components/sync/core_impl/sync_manager_impl_unittest.cc
diff --git a/components/sync/core_impl/sync_manager_impl_unittest.cc b/components/sync/core_impl/sync_manager_impl_unittest.cc
index fc21b8ad4dc8fd972729c1e95135b96b295a1406..e0c24297814dfdc213bb9ebd7d9fd5d6e39c60cb 100644
--- a/components/sync/core_impl/sync_manager_impl_unittest.cc
+++ b/components/sync/core_impl/sync_manager_impl_unittest.cc
@@ -1156,16 +1156,16 @@ class SyncManagerTest : public testing::Test,
void SetImplicitPassphraseAndCheck(const std::string& passphrase) {
sync_manager_.GetEncryptionHandler()->SetEncryptionPassphrase(passphrase,
false);
- EXPECT_EQ(IMPLICIT_PASSPHRASE,
+ EXPECT_EQ(PassphraseType::IMPLICIT_PASSPHRASE,
sync_manager_.GetEncryptionHandler()->GetPassphraseType());
}
void SetCustomPassphraseAndCheck(const std::string& passphrase) {
EXPECT_CALL(encryption_observer_,
- OnPassphraseTypeChanged(CUSTOM_PASSPHRASE, _));
+ OnPassphraseTypeChanged(PassphraseType::CUSTOM_PASSPHRASE, _));
sync_manager_.GetEncryptionHandler()->SetEncryptionPassphrase(passphrase,
true);
- EXPECT_EQ(CUSTOM_PASSPHRASE,
+ EXPECT_EQ(PassphraseType::CUSTOM_PASSPHRASE,
sync_manager_.GetEncryptionHandler()->GetPassphraseType());
}
@@ -1499,7 +1499,7 @@ TEST_F(SyncManagerTest, SupplyPendingGAIAPass) {
OnBootstrapTokenUpdated(_, PASSPHRASE_BOOTSTRAP_TOKEN));
ExpectPassphraseAcceptance();
sync_manager_.GetEncryptionHandler()->SetDecryptionPassphrase("passphrase2");
- EXPECT_EQ(IMPLICIT_PASSPHRASE,
+ EXPECT_EQ(PassphraseType::IMPLICIT_PASSPHRASE,
sync_manager_.GetEncryptionHandler()->GetPassphraseType());
EXPECT_FALSE(IsEncryptEverythingEnabledForTest());
{
@@ -1617,7 +1617,7 @@ TEST_F(SyncManagerTest, SupplyPendingExplicitPass) {
}
EXPECT_CALL(encryption_observer_, OnCryptographerStateChanged(_));
EXPECT_CALL(encryption_observer_,
- OnPassphraseTypeChanged(CUSTOM_PASSPHRASE, _));
+ OnPassphraseTypeChanged(PassphraseType::CUSTOM_PASSPHRASE, _));
EXPECT_CALL(encryption_observer_, OnPassphraseRequired(_, _));
EXPECT_CALL(encryption_observer_, OnEncryptedTypesChanged(_, false));
sync_manager_.GetEncryptionHandler()->Init();
@@ -1625,7 +1625,7 @@ TEST_F(SyncManagerTest, SupplyPendingExplicitPass) {
OnBootstrapTokenUpdated(_, PASSPHRASE_BOOTSTRAP_TOKEN));
ExpectPassphraseAcceptance();
sync_manager_.GetEncryptionHandler()->SetDecryptionPassphrase("explicit");
- EXPECT_EQ(CUSTOM_PASSPHRASE,
+ EXPECT_EQ(PassphraseType::CUSTOM_PASSPHRASE,
sync_manager_.GetEncryptionHandler()->GetPassphraseType());
EXPECT_FALSE(IsEncryptEverythingEnabledForTest());
{

Powered by Google App Engine
This is Rietveld 408576698