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

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

Issue 312553002: Rename GCMStatsRecorder to GCMStatsRecorderImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | google_apis/gcm/engine/connection_factory_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <vector> 6 #include <vector>
7 7
8 #include "google_apis/gcm/engine/checkin_request.h" 8 #include "google_apis/gcm/engine/checkin_request.h"
9 #include "google_apis/gcm/monitoring/gcm_stats_recorder.h" 9 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h"
10 #include "google_apis/gcm/protocol/checkin.pb.h" 10 #include "google_apis/gcm/protocol/checkin.pb.h"
11 #include "net/base/backoff_entry.h" 11 #include "net/base/backoff_entry.h"
12 #include "net/url_request/test_url_fetcher_factory.h" 12 #include "net/url_request/test_url_fetcher_factory.h"
13 #include "net/url_request/url_request_test_util.h" 13 #include "net/url_request/url_request_test_util.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace gcm { 16 namespace gcm {
17 17
18 namespace { 18 namespace {
19 19
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool callback_called_; 85 bool callback_called_;
86 uint64 android_id_; 86 uint64 android_id_;
87 uint64 security_token_; 87 uint64 security_token_;
88 int checkin_device_type_; 88 int checkin_device_type_;
89 base::MessageLoop message_loop_; 89 base::MessageLoop message_loop_;
90 net::TestURLFetcherFactory url_fetcher_factory_; 90 net::TestURLFetcherFactory url_fetcher_factory_;
91 scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_; 91 scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_;
92 checkin_proto::ChromeBuildProto chrome_build_proto_; 92 checkin_proto::ChromeBuildProto chrome_build_proto_;
93 std::vector<std::string> account_ids_; 93 std::vector<std::string> account_ids_;
94 scoped_ptr<CheckinRequest> request_; 94 scoped_ptr<CheckinRequest> request_;
95 GCMStatsRecorder 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_.message_loop_proxy())) {
105 account_ids_.push_back("account_id"); 105 account_ids_.push_back("account_id");
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 SetResponse(VALID_RESPONSE); 378 SetResponse(VALID_RESPONSE);
379 CompleteFetch(); 379 CompleteFetch();
380 380
381 EXPECT_TRUE(callback_called_); 381 EXPECT_TRUE(callback_called_);
382 EXPECT_EQ(kAndroidId, android_id_); 382 EXPECT_EQ(kAndroidId, android_id_);
383 EXPECT_EQ(kSecurityToken, security_token_); 383 EXPECT_EQ(kSecurityToken, security_token_);
384 } 384 }
385 385
386 } // namespace gcm 386 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | google_apis/gcm/engine/connection_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698