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

Side by Side Diff: google_apis/gcm/engine/checkin_request_unittest.cc

Issue 1184713004: google_apis: Migrate callers of message_loop_proxy() to task_runner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "google_apis/gcm/engine/checkin_request.h" 7 #include "google_apis/gcm/engine/checkin_request.h"
8 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h" 8 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h"
9 #include "google_apis/gcm/protocol/checkin.pb.h" 9 #include "google_apis/gcm/protocol/checkin.pb.h"
10 #include "net/base/backoff_entry.h" 10 #include "net/base/backoff_entry.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 scoped_ptr<CheckinRequest> request_; 94 scoped_ptr<CheckinRequest> request_;
95 FakeGCMStatsRecorder recorder_; 95 FakeGCMStatsRecorder recorder_;
96 }; 96 };
97 97
98 CheckinRequestTest::CheckinRequestTest() 98 CheckinRequestTest::CheckinRequestTest()
99 : callback_called_(false), 99 : callback_called_(false),
100 android_id_(kBlankAndroidId), 100 android_id_(kBlankAndroidId),
101 security_token_(kBlankSecurityToken), 101 security_token_(kBlankSecurityToken),
102 checkin_device_type_(0), 102 checkin_device_type_(0),
103 url_request_context_getter_(new net::TestURLRequestContextGetter( 103 url_request_context_getter_(new net::TestURLRequestContextGetter(
104 message_loop_.message_loop_proxy())) { 104 message_loop_.task_runner())) {
105 } 105 }
106 106
107 CheckinRequestTest::~CheckinRequestTest() {} 107 CheckinRequestTest::~CheckinRequestTest() {}
108 108
109 void CheckinRequestTest::FetcherCallback( 109 void CheckinRequestTest::FetcherCallback(
110 const checkin_proto::AndroidCheckinResponse& checkin_response) { 110 const checkin_proto::AndroidCheckinResponse& checkin_response) {
111 callback_called_ = true; 111 callback_called_ = true;
112 if (checkin_response.has_android_id()) 112 if (checkin_response.has_android_id())
113 android_id_ = checkin_response.android_id(); 113 android_id_ = checkin_response.android_id();
114 if (checkin_response.has_security_token()) 114 if (checkin_response.has_security_token())
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 SetResponse(VALID_RESPONSE); 380 SetResponse(VALID_RESPONSE);
381 CompleteFetch(); 381 CompleteFetch();
382 382
383 EXPECT_TRUE(callback_called_); 383 EXPECT_TRUE(callback_called_);
384 EXPECT_EQ(kAndroidId, android_id_); 384 EXPECT_EQ(kAndroidId, android_id_);
385 EXPECT_EQ(kSecurityToken, security_token_); 385 EXPECT_EQ(kSecurityToken, security_token_);
386 } 386 }
387 387
388 } // namespace gcm 388 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_token_service_unittest.cc ('k') | google_apis/gcm/engine/gcm_store_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698