| Index: google_apis/gcm/engine/checkin_request_unittest.cc
|
| diff --git a/google_apis/gcm/engine/checkin_request_unittest.cc b/google_apis/gcm/engine/checkin_request_unittest.cc
|
| index ba77f9f7be13b8c90776cde9830f0307259f775a..0142e0ca4f135b1ebf3f599d2f781c25953c1559 100644
|
| --- a/google_apis/gcm/engine/checkin_request_unittest.cc
|
| +++ b/google_apis/gcm/engine/checkin_request_unittest.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "google_apis/gcm/engine/checkin_request.h"
|
| #include "google_apis/gcm/protocol/checkin.pb.h"
|
| @@ -85,6 +86,7 @@ class CheckinRequestTest : public testing::Test {
|
| net::TestURLFetcherFactory url_fetcher_factory_;
|
| scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_;
|
| checkin_proto::ChromeBuildProto chrome_build_proto_;
|
| + std::vector<std::string> account_ids_;
|
| scoped_ptr<CheckinRequest> request_;
|
| };
|
|
|
| @@ -94,7 +96,9 @@ CheckinRequestTest::CheckinRequestTest()
|
| security_token_(kBlankSecurityToken),
|
| checkin_device_type_(0),
|
| url_request_context_getter_(new net::TestURLRequestContextGetter(
|
| - message_loop_.message_loop_proxy())) {}
|
| + message_loop_.message_loop_proxy())) {
|
| + account_ids_.push_back("account_id");
|
| +}
|
|
|
| CheckinRequestTest::~CheckinRequestTest() {}
|
|
|
| @@ -116,12 +120,12 @@ void CheckinRequestTest::CreateRequest(uint64 android_id,
|
| // Then create a request with that protobuf and specified android_id,
|
| // security_token.
|
| request_.reset(new CheckinRequest(
|
| - base::Bind(&CheckinRequestTest::FetcherCallback,
|
| - base::Unretained(this)),
|
| + base::Bind(&CheckinRequestTest::FetcherCallback, base::Unretained(this)),
|
| kDefaultBackoffPolicy,
|
| chrome_build_proto_,
|
| android_id,
|
| security_token,
|
| + account_ids_,
|
| url_request_context_getter_.get()));
|
|
|
| // Setting android_id_ and security_token_ to blank value, not used elsewhere
|
| @@ -193,6 +197,9 @@ TEST_F(CheckinRequestTest, FetcherData) {
|
| EXPECT_EQ(checkin_proto::DEVICE_CHROME_BROWSER,
|
| request_proto.checkin().type());
|
| #endif
|
| +
|
| + EXPECT_EQ(1, request_proto.account_cookie_size());
|
| + EXPECT_EQ("[account_id]", request_proto.account_cookie(0));
|
| }
|
|
|
| TEST_F(CheckinRequestTest, ResponseBodyEmpty) {
|
|
|