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

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

Issue 375663002: Leverage profile's http network session's HttpAuthCache to support proxy auth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 | « google_apis/gcm/engine/connection_factory_impl.cc ('k') | google_apis/gcm/tools/mcs_probe.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/engine/connection_factory_impl.h" 5 #include "google_apis/gcm/engine/connection_factory_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 FakeConnectionHandler* fake_handler_; 152 FakeConnectionHandler* fake_handler_;
153 FakeGCMStatsRecorder dummy_recorder_; 153 FakeGCMStatsRecorder dummy_recorder_;
154 }; 154 };
155 155
156 TestConnectionFactoryImpl::TestConnectionFactoryImpl( 156 TestConnectionFactoryImpl::TestConnectionFactoryImpl(
157 const base::Closure& finished_callback) 157 const base::Closure& finished_callback)
158 : ConnectionFactoryImpl(BuildEndpoints(), 158 : ConnectionFactoryImpl(BuildEndpoints(),
159 net::BackoffEntry::Policy(), 159 net::BackoffEntry::Policy(),
160 NULL, 160 NULL,
161 NULL, 161 NULL,
162 NULL,
162 &dummy_recorder_), 163 &dummy_recorder_),
163 connect_result_(net::ERR_UNEXPECTED), 164 connect_result_(net::ERR_UNEXPECTED),
164 num_expected_attempts_(0), 165 num_expected_attempts_(0),
165 connections_fulfilled_(true), 166 connections_fulfilled_(true),
166 delay_login_(false), 167 delay_login_(false),
167 finished_callback_(finished_callback), 168 finished_callback_(finished_callback),
168 fake_handler_(NULL) { 169 fake_handler_(NULL) {
169 // Set a non-null time. 170 // Set a non-null time.
170 tick_clock_.Advance(base::TimeDelta::FromMilliseconds(1)); 171 tick_clock_.Advance(base::TimeDelta::FromMilliseconds(1));
171 } 172 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // When the network returns, attempt to connect. 544 // When the network returns, attempt to connect.
544 factory()->SetConnectResult(net::OK); 545 factory()->SetConnectResult(net::OK);
545 factory()->OnNetworkChanged(net::NetworkChangeNotifier::CONNECTION_4G); 546 factory()->OnNetworkChanged(net::NetworkChangeNotifier::CONNECTION_4G);
546 WaitForConnections(); 547 WaitForConnections();
547 548
548 EXPECT_TRUE(factory()->IsEndpointReachable()); 549 EXPECT_TRUE(factory()->IsEndpointReachable());
549 EXPECT_TRUE(factory()->NextRetryAttempt().is_null()); 550 EXPECT_TRUE(factory()->NextRetryAttempt().is_null());
550 } 551 }
551 552
552 } // namespace gcm 553 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/connection_factory_impl.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698