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

Unified Diff: components/cryptauth/cryptauth_gcm_manager_impl_unittest.cc

Issue 2502343003: Moved //components/proximity_auth/cryptauth to //components/cryptauth. (Closed)
Patch Set: Fixed proto #includes. Created 4 years, 1 month 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/cryptauth/cryptauth_gcm_manager_impl_unittest.cc
diff --git a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc b/components/cryptauth/cryptauth_gcm_manager_impl_unittest.cc
similarity index 87%
rename from components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc
rename to components/cryptauth/cryptauth_gcm_manager_impl_unittest.cc
index e07ec348275350b6fd270bfd18fb3a67e68e5255..473a24c0c79997bc6545e071034cfa286e4bae67 100644
--- a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc
+++ b/components/cryptauth/cryptauth_gcm_manager_impl_unittest.cc
@@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h"
+#include "components/cryptauth/cryptauth_gcm_manager_impl.h"
#include "base/macros.h"
+#include "components/cryptauth/pref_names.h"
#include "components/gcm_driver/fake_gcm_driver.h"
#include "components/gcm_driver/gcm_client.h"
#include "components/prefs/testing_pref_service.h"
-#include "components/proximity_auth/cryptauth/pref_names.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
using ::testing::_;
using ::testing::SaveArg;
-namespace proximity_auth {
+namespace cryptauth {
namespace {
@@ -47,11 +47,11 @@ class MockGCMDriver : public gcm::FakeGCMDriver {
} // namespace
-class ProximityAuthCryptAuthGCMManagerImplTest
+class CryptAuthGCMManagerImplTest
: public testing::Test,
public CryptAuthGCMManager::Observer {
protected:
- ProximityAuthCryptAuthGCMManagerImplTest()
+ CryptAuthGCMManagerImplTest()
: gcm_manager_(&gcm_driver_, &pref_service_) {}
// testing::Test:
@@ -98,22 +98,22 @@ class ProximityAuthCryptAuthGCMManagerImplTest
CryptAuthGCMManagerImpl gcm_manager_;
- DISALLOW_COPY_AND_ASSIGN(ProximityAuthCryptAuthGCMManagerImplTest);
+ DISALLOW_COPY_AND_ASSIGN(CryptAuthGCMManagerImplTest);
};
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, RegisterPrefs) {
+TEST_F(CryptAuthGCMManagerImplTest, RegisterPrefs) {
TestingPrefServiceSimple pref_service;
CryptAuthGCMManager::RegisterPrefs(pref_service.registry());
EXPECT_TRUE(pref_service.FindPreference(prefs::kCryptAuthGCMRegistrationId));
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, RegistrationSucceeds) {
+TEST_F(CryptAuthGCMManagerImplTest, RegistrationSucceeds) {
EXPECT_EQ(std::string(), gcm_manager_.GetRegistrationId());
RegisterWithGCM(gcm::GCMClient::SUCCESS);
EXPECT_EQ(kNewGCMRegistrationId, gcm_manager_.GetRegistrationId());
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest,
+TEST_F(CryptAuthGCMManagerImplTest,
RegistrationSucceedsWithExistingRegistration) {
pref_service_.SetString(prefs::kCryptAuthGCMRegistrationId,
kExistingGCMRegistrationId);
@@ -124,7 +124,7 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest,
pref_service_.GetString(prefs::kCryptAuthGCMRegistrationId));
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, RegisterWithGCMFails) {
+TEST_F(CryptAuthGCMManagerImplTest, RegisterWithGCMFails) {
EXPECT_EQ(std::string(), gcm_manager_.GetRegistrationId());
RegisterWithGCM(gcm::GCMClient::SERVER_ERROR);
EXPECT_EQ(std::string(), gcm_manager_.GetRegistrationId());
@@ -132,7 +132,7 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, RegisterWithGCMFails) {
pref_service_.GetString(prefs::kCryptAuthGCMRegistrationId));
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest,
+TEST_F(CryptAuthGCMManagerImplTest,
RegisterWithGCMFailsWithExistingRegistration) {
pref_service_.SetString(prefs::kCryptAuthGCMRegistrationId,
kExistingGCMRegistrationId);
@@ -143,7 +143,7 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest,
pref_service_.GetString(prefs::kCryptAuthGCMRegistrationId));
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest,
+TEST_F(CryptAuthGCMManagerImplTest,
RegistrationFailsThenSucceeds) {
EXPECT_EQ(std::string(), gcm_manager_.GetRegistrationId());
RegisterWithGCM(gcm::GCMClient::NETWORK_ERROR);
@@ -152,7 +152,7 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest,
EXPECT_EQ(kNewGCMRegistrationId, gcm_manager_.GetRegistrationId());
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, ConcurrentRegistrations) {
+TEST_F(CryptAuthGCMManagerImplTest, ConcurrentRegistrations) {
// If multiple RegisterWithGCM() calls are made concurrently, only one
// registration attempt should actually be made.
EXPECT_CALL(gcm_driver_, RegisterImpl(kCryptAuthGCMAppId, _));
@@ -166,7 +166,7 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, ConcurrentRegistrations) {
EXPECT_EQ(kNewGCMRegistrationId, gcm_manager_.GetRegistrationId());
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, ReenrollmentMessagesReceived) {
+TEST_F(CryptAuthGCMManagerImplTest, ReenrollmentMessagesReceived) {
EXPECT_CALL(*this, OnReenrollMessageProxy()).Times(2);
gcm::IncomingMessage message;
@@ -181,7 +181,7 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, ReenrollmentMessagesReceived) {
gcm_app_handler->OnMessage(kCryptAuthGCMAppId, message);
}
-TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, ResyncMessagesReceived) {
+TEST_F(CryptAuthGCMManagerImplTest, ResyncMessagesReceived) {
EXPECT_CALL(*this, OnResyncMessageProxy()).Times(2);
gcm::IncomingMessage message;
@@ -195,4 +195,4 @@ TEST_F(ProximityAuthCryptAuthGCMManagerImplTest, ResyncMessagesReceived) {
gcm_app_handler->OnMessage(kCryptAuthGCMAppId, message);
}
-} // namespace proximity_auth
+} // namespace cryptauth
« no previous file with comments | « components/cryptauth/cryptauth_gcm_manager_impl.cc ('k') | components/cryptauth/fake_cryptauth_gcm_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698