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

Side by Side Diff: chrome_frame/test/chrome_frame_test_utils.h

Issue 10019015: Update uses of TimeDelta in chrome_frame/*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 quit_loop_invoked_ = false; 197 quit_loop_invoked_ = false;
198 loop_.MessageLoop::Run(); 198 loop_.MessageLoop::Run();
199 } 199 }
200 200
201 void PostTask(const tracked_objects::Location& from_here, 201 void PostTask(const tracked_objects::Location& from_here,
202 const base::Closure& task) { 202 const base::Closure& task) {
203 loop_.PostTask(from_here, task); 203 loop_.PostTask(from_here, task);
204 } 204 }
205 205
206 void PostDelayedTask(const tracked_objects::Location& from_here, 206 void PostDelayedTask(const tracked_objects::Location& from_here,
207 const base::Closure& task, int64 delay_ms) { 207 const base::Closure& task, int64 delay_ms) {
robertshield 2012/04/18 02:23:09 IMO for consistency, should modify this method to
208 loop_.PostDelayedTask(from_here, task, delay_ms); 208 loop_.PostDelayedTask(
209 from_here, task, base::TimeDelta::FromMilliseconds(delay_ms));
209 } 210 }
210 211
211 void Quit() { 212 void Quit() {
212 QuitAfter(base::TimeDelta()); 213 QuitAfter(base::TimeDelta());
213 } 214 }
214 215
215 void QuitAfter(base::TimeDelta delay) { 216 void QuitAfter(base::TimeDelta delay) {
216 quit_loop_invoked_ = true; 217 quit_loop_invoked_ = true;
217 loop_.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), delay); 218 loop_.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), delay);
218 } 219 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } // namespace chrome_frame_test 332 } // namespace chrome_frame_test
332 333
333 // TODO(tommi): This is a temporary workaround while we're getting our 334 // TODO(tommi): This is a temporary workaround while we're getting our
334 // Singleton story straight. Ideally each test should clear up any singletons 335 // Singleton story straight. Ideally each test should clear up any singletons
335 // it might have created, but test cases do not implicitly have their own 336 // it might have created, but test cases do not implicitly have their own
336 // AtExitManager, so we have this workaround method for tests that depend on 337 // AtExitManager, so we have this workaround method for tests that depend on
337 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. 338 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc.
338 void DeleteAllSingletons(); 339 void DeleteAllSingletons();
339 340
340 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 341 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698