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

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

Issue 330733002: Move IdentityProvider usage from GCMDriverDesktop to GCMProfileService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after 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 | « components/gcm_driver/gcm_client_impl.cc ('k') | components/gcm_driver/gcm_driver.h » ('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 "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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 gcm_client_->registrations_[app_id] = registration; 444 gcm_client_->registrations_[app_id] = registration;
445 } 445 }
446 446
447 void GCMClientImplTest::InitializeGCMClient() { 447 void GCMClientImplTest::InitializeGCMClient() {
448 clock()->Advance(base::TimeDelta::FromMilliseconds(1)); 448 clock()->Advance(base::TimeDelta::FromMilliseconds(1));
449 449
450 // Actual initialization. 450 // Actual initialization.
451 GCMClient::ChromeBuildInfo chrome_build_info; 451 GCMClient::ChromeBuildInfo chrome_build_info;
452 gcm_client_->Initialize(chrome_build_info, 452 gcm_client_->Initialize(chrome_build_info,
453 temp_directory_.path(), 453 temp_directory_.path(),
454 std::vector<std::string>(),
455 message_loop_.message_loop_proxy(), 454 message_loop_.message_loop_proxy(),
456 url_request_context_getter_, 455 url_request_context_getter_,
457 make_scoped_ptr<Encryptor>(new FakeEncryptor), 456 make_scoped_ptr<Encryptor>(new FakeEncryptor),
458 this); 457 this);
459 } 458 }
460 459
461 void GCMClientImplTest::StartGCMClient() { 460 void GCMClientImplTest::StartGCMClient() {
462 // Start loading and check-in. 461 // Start loading and check-in.
463 gcm_client_->Start(); 462 gcm_client_->Start();
464 463
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 TEST_F(GCMClientImplStartAndStopTest, StartStopAndRestartImmediately) { 832 TEST_F(GCMClientImplStartAndStopTest, StartStopAndRestartImmediately) {
834 // Start the GCM and then stop and restart it immediately. 833 // Start the GCM and then stop and restart it immediately.
835 gcm_client()->Start(); 834 gcm_client()->Start();
836 gcm_client()->Stop(); 835 gcm_client()->Stop();
837 gcm_client()->Start(); 836 gcm_client()->Start();
838 837
839 PumpLoopUntilIdle(); 838 PumpLoopUntilIdle();
840 } 839 }
841 840
842 } // namespace gcm 841 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_client_impl.cc ('k') | components/gcm_driver/gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698