| Index: chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| diff --git a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| index 6fef486dbb9f04e4dcb8f58d5c7dd92d599b757f..5b983868f1323240d9448325992e529459ad4cb9 100644
|
| --- a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| +++ b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| @@ -49,23 +49,23 @@ class GCMProfileServiceTest : public testing::Test {
|
| GCMClientMock* GetGCMClient() const;
|
|
|
| void RegisterAndWaitForCompletion(const std::vector<std::string>& sender_ids);
|
| - void SendAndWaitForCompletion(const GCMClient::OutgoingMessage& message);
|
| + void SendAndWaitForCompletion(const OutgoingMessage& message);
|
|
|
| void RegisterCompleted(const base::Closure& callback,
|
| const std::string& registration_id,
|
| - GCMClient::Result result);
|
| + Result result);
|
| void SendCompleted(const base::Closure& callback,
|
| const std::string& message_id,
|
| - GCMClient::Result result);
|
| + Result result);
|
|
|
| content::TestBrowserThreadBundle thread_bundle_;
|
| scoped_ptr<TestingProfile> profile_;
|
| GCMProfileService* gcm_profile_service_;
|
|
|
| std::string registration_id_;
|
| - GCMClient::Result registration_result_;
|
| + Result registration_result_;
|
| std::string send_message_id_;
|
| - GCMClient::Result send_result_;
|
| + Result send_result_;
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(GCMProfileServiceTest);
|
| @@ -73,8 +73,8 @@ class GCMProfileServiceTest : public testing::Test {
|
|
|
| GCMProfileServiceTest::GCMProfileServiceTest()
|
| : gcm_profile_service_(NULL),
|
| - registration_result_(GCMClient::UNKNOWN_ERROR),
|
| - send_result_(GCMClient::UNKNOWN_ERROR) {
|
| + registration_result_(RESULT_UNKNOWN_ERROR),
|
| + send_result_(RESULT_UNKNOWN_ERROR) {
|
| }
|
|
|
| GCMProfileServiceTest::~GCMProfileServiceTest() {
|
| @@ -117,7 +117,7 @@ void GCMProfileServiceTest::RegisterAndWaitForCompletion(
|
| }
|
|
|
| void GCMProfileServiceTest::SendAndWaitForCompletion(
|
| - const GCMClient::OutgoingMessage& message) {
|
| + const OutgoingMessage& message) {
|
| base::RunLoop run_loop;
|
| gcm_profile_service_->Send(kTestAppID,
|
| kUserID,
|
| @@ -131,7 +131,7 @@ void GCMProfileServiceTest::SendAndWaitForCompletion(
|
| void GCMProfileServiceTest::RegisterCompleted(
|
| const base::Closure& callback,
|
| const std::string& registration_id,
|
| - GCMClient::Result result) {
|
| + Result result) {
|
| registration_id_ = registration_id;
|
| registration_result_ = result;
|
| callback.Run();
|
| @@ -140,7 +140,7 @@ void GCMProfileServiceTest::RegisterCompleted(
|
| void GCMProfileServiceTest::SendCompleted(
|
| const base::Closure& callback,
|
| const std::string& message_id,
|
| - GCMClient::Result result) {
|
| + Result result) {
|
| send_message_id_ = message_id;
|
| send_result_ = result;
|
| callback.Run();
|
| @@ -164,7 +164,7 @@ TEST_F(GCMProfileServiceTest, RegisterUnderNeutralChannelSignal) {
|
| std::string expected_registration_id =
|
| GCMClientMock::GetRegistrationIdFromSenderIds(sender_ids);
|
| EXPECT_EQ(expected_registration_id, registration_id_);
|
| - EXPECT_EQ(GCMClient::SUCCESS, registration_result_);
|
| + EXPECT_EQ(RESULT_SUCCESS, registration_result_);
|
| }
|
|
|
| TEST_F(GCMProfileServiceTest, SendUnderNeutralChannelSignal) {
|
| @@ -173,7 +173,7 @@ TEST_F(GCMProfileServiceTest, SendUnderNeutralChannelSignal) {
|
| EXPECT_EQ(GCMClientMock::UNINITIALIZED, GetGCMClient()->status());
|
|
|
| // Invoking send will make GCMClient checked in.
|
| - GCMClient::OutgoingMessage message;
|
| + OutgoingMessage message;
|
| message.id = "1";
|
| message.data["key1"] = "value1";
|
| SendAndWaitForCompletion( message);
|
| @@ -184,7 +184,7 @@ TEST_F(GCMProfileServiceTest, SendUnderNeutralChannelSignal) {
|
|
|
| // Sending should succeed.
|
| EXPECT_EQ(message.id, send_message_id_);
|
| - EXPECT_EQ(GCMClient::SUCCESS, send_result_);
|
| + EXPECT_EQ(RESULT_SUCCESS, send_result_);
|
| }
|
|
|
| } // namespace gcm
|
|
|