| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "google_apis/gcm/engine/checkin_request.h" | 9 #include "google_apis/gcm/engine/checkin_request.h" |
| 10 #include "google_apis/gcm/engine/gcm_request_test_base.h" | 10 #include "google_apis/gcm/engine/gcm_request_test_base.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void CreateRequest(uint64_t android_id, uint64_t security_token); | 42 void CreateRequest(uint64_t android_id, uint64_t security_token); |
| 43 | 43 |
| 44 void SetResponseScenario(ResponseScenario response_scenario); | 44 void SetResponseScenario(ResponseScenario response_scenario); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 bool callback_called_; | 47 bool callback_called_; |
| 48 uint64_t android_id_; | 48 uint64_t android_id_; |
| 49 uint64_t security_token_; | 49 uint64_t security_token_; |
| 50 int checkin_device_type_; | 50 int checkin_device_type_; |
| 51 checkin_proto::ChromeBuildProto chrome_build_proto_; | 51 checkin_proto::ChromeBuildProto chrome_build_proto_; |
| 52 scoped_ptr<CheckinRequest> request_; | 52 std::unique_ptr<CheckinRequest> request_; |
| 53 FakeGCMStatsRecorder recorder_; | 53 FakeGCMStatsRecorder recorder_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 CheckinRequestTest::CheckinRequestTest() | 56 CheckinRequestTest::CheckinRequestTest() |
| 57 : callback_called_(false), | 57 : callback_called_(false), |
| 58 android_id_(kBlankAndroidId), | 58 android_id_(kBlankAndroidId), |
| 59 security_token_(kBlankSecurityToken), | 59 security_token_(kBlankSecurityToken), |
| 60 checkin_device_type_(0) { | 60 checkin_device_type_(0) { |
| 61 } | 61 } |
| 62 | 62 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 SetResponseScenario(VALID_RESPONSE); | 321 SetResponseScenario(VALID_RESPONSE); |
| 322 CompleteFetch(); | 322 CompleteFetch(); |
| 323 | 323 |
| 324 EXPECT_TRUE(callback_called_); | 324 EXPECT_TRUE(callback_called_); |
| 325 EXPECT_EQ(kAndroidId, android_id_); | 325 EXPECT_EQ(kAndroidId, android_id_); |
| 326 EXPECT_EQ(kSecurityToken, security_token_); | 326 EXPECT_EQ(kSecurityToken, security_token_); |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace gcm | 329 } // namespace gcm |
| OLD | NEW |