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

Unified Diff: google_apis/gcm/engine/connection_factory_impl_unittest.cc

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gcm/engine/connection_factory_impl_unittest.cc
diff --git a/google_apis/gcm/engine/connection_factory_impl_unittest.cc b/google_apis/gcm/engine/connection_factory_impl_unittest.cc
index 56ed855ef573fc82c15b9f01613704e17ab455fe..75b3d9263a336f24f9cb99f72f3c9aa5ee81943e 100644
--- a/google_apis/gcm/engine/connection_factory_impl_unittest.cc
+++ b/google_apis/gcm/engine/connection_factory_impl_unittest.cc
@@ -147,6 +147,8 @@ TestConnectionFactoryImpl::TestConnectionFactoryImpl(
NULL,
NULL,
&dummy_recorder_),
+ // Set a non-null time.
+ tick_clock_(base::TimeTicks() + base::TimeDelta::FromMilliseconds(1)),
connect_result_(net::ERR_UNEXPECTED),
num_expected_attempts_(0),
connections_fulfilled_(true),
@@ -155,10 +157,7 @@ TestConnectionFactoryImpl::TestConnectionFactoryImpl(
scoped_handler_(
new FakeConnectionHandler(base::Bind(&ReadContinuation),
base::Bind(&WriteContinuation))),
- fake_handler_(scoped_handler_.get()) {
- // Set a non-null time.
- tick_clock_.Advance(base::TimeDelta::FromMilliseconds(1));
-}
+ fake_handler_(scoped_handler_.get()) {}
TestConnectionFactoryImpl::~TestConnectionFactoryImpl() {
EXPECT_EQ(0, num_expected_attempts_);
« no previous file with comments | « content/renderer/media/render_media_log_unittest.cc ('k') | media/audio/win/audio_device_listener_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698