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

Side by Side Diff: chrome/browser/net/network_time_tracker_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 | « chrome/browser/net/network_time_tracker.cc ('k') | chrome/browser/net/predictor.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 <math.h> 5 #include <math.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 return testing::AssertionSuccess(); 118 return testing::AssertionSuccess();
119 } 119 }
120 120
121 NetworkTimeTracker* network_time_tracker() { 121 NetworkTimeTracker* network_time_tracker() {
122 return network_time_tracker_.get(); 122 return network_time_tracker_.get();
123 } 123 }
124 124
125 private: 125 private:
126 // Message loop and threads for the tracker's internal logic. 126 // Message loop and threads for the tracker's internal logic.
127 MessageLoop message_loop_; 127 base::MessageLoop message_loop_;
128 content::TestBrowserThread ui_thread; 128 content::TestBrowserThread ui_thread;
129 content::TestBrowserThread io_thread; 129 content::TestBrowserThread io_thread;
130 130
131 // Used in building the current time that |tick_clock_| reports. See Now() 131 // Used in building the current time that |tick_clock_| reports. See Now()
132 // for details. 132 // for details.
133 base::Time now_; 133 base::Time now_;
134 base::TimeTicks ticks_now_; 134 base::TimeTicks ticks_now_;
135 135
136 // A custom clock that allows arbitrary time delays. 136 // A custom clock that allows arbitrary time delays.
137 scoped_ptr<TestTickClock> tick_clock_; 137 scoped_ptr<TestTickClock> tick_clock_;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // dereference the destroyed tracker. 210 // dereference the destroyed tracker.
211 TEST_F(NetworkTimeTrackerTest, UpdateAfterTrackerDestroyed) { 211 TEST_F(NetworkTimeTrackerTest, UpdateAfterTrackerDestroyed) {
212 StartTracker(); 212 StartTracker();
213 StopTracker(); 213 StopTracker();
214 UpdateNetworkTime( 214 UpdateNetworkTime(
215 Now(), 215 Now(),
216 base::TimeDelta::FromMilliseconds(kResolution1), 216 base::TimeDelta::FromMilliseconds(kResolution1),
217 base::TimeDelta::FromMilliseconds(kLatency1), 217 base::TimeDelta::FromMilliseconds(kLatency1),
218 TicksNow()); 218 TicksNow());
219 } 219 }
OLDNEW
« no previous file with comments | « chrome/browser/net/network_time_tracker.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698