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

Side by Side Diff: components/gcm_driver/gcm_client_impl_unittest.cc

Issue 320993003: [GCM] Add app handler support for connection events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add basic tests 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
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 "components/gcm_driver/gcm_client_impl.h" 5 #include "components/gcm_driver/gcm_client_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 GCMClient::Result result) OVERRIDE {} 243 GCMClient::Result result) OVERRIDE {}
244 virtual void OnMessageReceived(const std::string& registration_id, 244 virtual void OnMessageReceived(const std::string& registration_id,
245 const GCMClient::IncomingMessage& message) 245 const GCMClient::IncomingMessage& message)
246 OVERRIDE; 246 OVERRIDE;
247 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE; 247 virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE;
248 virtual void OnMessageSendError( 248 virtual void OnMessageSendError(
249 const std::string& app_id, 249 const std::string& app_id,
250 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE; 250 const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE;
251 virtual void OnGCMReady() OVERRIDE; 251 virtual void OnGCMReady() OVERRIDE;
252 virtual void OnActivityRecorded() OVERRIDE {} 252 virtual void OnActivityRecorded() OVERRIDE {}
253 virtual void OnConnected(const net::IPEndPoint& ip_endpoint) OVERRIDE {}
254 virtual void OnDisconnected() OVERRIDE {}
253 255
254 GCMClientImpl* gcm_client() const { return gcm_client_.get(); } 256 GCMClientImpl* gcm_client() const { return gcm_client_.get(); }
255 FakeMCSClient* mcs_client() const { 257 FakeMCSClient* mcs_client() const {
256 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get()); 258 return reinterpret_cast<FakeMCSClient*>(gcm_client_->mcs_client_.get());
257 } 259 }
258 ConnectionFactory* connection_factory() const { 260 ConnectionFactory* connection_factory() const {
259 return gcm_client_->connection_factory_.get(); 261 return gcm_client_->connection_factory_.get();
260 } 262 }
261 263
262 void reset_last_event() { 264 void reset_last_event() {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 gservices_settings().GetCheckinURL()); 773 gservices_settings().GetCheckinURL());
772 EXPECT_EQ(GURL("http://alternative.url/registration"), 774 EXPECT_EQ(GURL("http://alternative.url/registration"),
773 gservices_settings().GetRegistrationURL()); 775 gservices_settings().GetRegistrationURL());
774 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"), 776 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"),
775 gservices_settings().GetMCSMainEndpoint()); 777 gservices_settings().GetMCSMainEndpoint());
776 EXPECT_EQ(GURL("https://alternative.gcm.host:443"), 778 EXPECT_EQ(GURL("https://alternative.gcm.host:443"),
777 gservices_settings().GetMCSFallbackEndpoint()); 779 gservices_settings().GetMCSFallbackEndpoint());
778 } 780 }
779 781
780 } // namespace gcm 782 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698