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 "google_apis/gcm/gcm_client_impl.h" | 5 #include "google_apis/gcm/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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // Actual initialization. | 450 // Actual initialization. |
451 checkin_proto::ChromeBuildProto chrome_build_proto; | 451 checkin_proto::ChromeBuildProto chrome_build_proto; |
452 gcm_client_->Initialize(chrome_build_proto, | 452 gcm_client_->Initialize(chrome_build_proto, |
453 temp_directory_.path(), | 453 temp_directory_.path(), |
454 std::vector<std::string>(), | 454 std::vector<std::string>(), |
455 message_loop_.message_loop_proxy(), | 455 message_loop_.message_loop_proxy(), |
456 url_request_context_getter_, | 456 url_request_context_getter_, |
457 this); | 457 this); |
458 | 458 |
459 // Start loading and check-in. | 459 // Start loading and check-in. |
460 gcm_client_->Load(); | 460 gcm_client_->Start(); |
461 | 461 |
462 PumpLoopUntilIdle(); | 462 PumpLoopUntilIdle(); |
463 } | 463 } |
464 | 464 |
465 void GCMClientImplTest::ReceiveMessageFromMCS(const MCSMessage& message) { | 465 void GCMClientImplTest::ReceiveMessageFromMCS(const MCSMessage& message) { |
466 gcm_client_->OnMessageReceivedFromMCS(message); | 466 gcm_client_->OnMessageReceivedFromMCS(message); |
467 } | 467 } |
468 | 468 |
469 void GCMClientImplTest::OnGCMReady() { | 469 void GCMClientImplTest::OnGCMReady() { |
470 last_event_ = LOADING_COMPLETED; | 470 last_event_ = LOADING_COMPLETED; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 gservices_settings().checkin_url()); | 772 gservices_settings().checkin_url()); |
773 EXPECT_EQ(GURL("http://alternative.url/registration"), | 773 EXPECT_EQ(GURL("http://alternative.url/registration"), |
774 gservices_settings().registration_url()); | 774 gservices_settings().registration_url()); |
775 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"), | 775 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"), |
776 gservices_settings().mcs_main_endpoint()); | 776 gservices_settings().mcs_main_endpoint()); |
777 EXPECT_EQ(GURL("https://alternative.gcm.host:443"), | 777 EXPECT_EQ(GURL("https://alternative.gcm.host:443"), |
778 gservices_settings().mcs_fallback_endpoint()); | 778 gservices_settings().mcs_fallback_endpoint()); |
779 } | 779 } |
780 | 780 |
781 } // namespace gcm | 781 } // namespace gcm |
OLD | NEW |