| OLD | NEW |
| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 loop_.MessageLoop::Run(); | 210 loop_.MessageLoop::Run(); |
| 211 timeout_closure_.Cancel(); | 211 timeout_closure_.Cancel(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void PostTask(const tracked_objects::Location& from_here, | 214 void PostTask(const tracked_objects::Location& from_here, |
| 215 const base::Closure& task) { | 215 const base::Closure& task) { |
| 216 loop_.PostTask(from_here, task); | 216 loop_.PostTask(from_here, task); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void PostDelayedTask(const tracked_objects::Location& from_here, | 219 void PostDelayedTask(const tracked_objects::Location& from_here, |
| 220 const base::Closure& task, int64 delay_ms) { | 220 const base::Closure& task, base::TimeDelta delay) { |
| 221 loop_.PostDelayedTask(from_here, task, delay_ms); | 221 loop_.PostDelayedTask(from_here, task, delay); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void Quit() { | 224 void Quit() { |
| 225 // Quit after no delay. | 225 // Quit after no delay. |
| 226 QuitAfter(base::TimeDelta()); | 226 QuitAfter(base::TimeDelta()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void QuitAfter(base::TimeDelta delay) { | 229 void QuitAfter(base::TimeDelta delay) { |
| 230 timeout_closure_.Cancel(); | 230 timeout_closure_.Cancel(); |
| 231 quit_loop_invoked_ = true; | 231 quit_loop_invoked_ = true; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 } // namespace chrome_frame_test | 375 } // namespace chrome_frame_test |
| 376 | 376 |
| 377 // TODO(tommi): This is a temporary workaround while we're getting our | 377 // TODO(tommi): This is a temporary workaround while we're getting our |
| 378 // Singleton story straight. Ideally each test should clear up any singletons | 378 // Singleton story straight. Ideally each test should clear up any singletons |
| 379 // it might have created, but test cases do not implicitly have their own | 379 // it might have created, but test cases do not implicitly have their own |
| 380 // AtExitManager, so we have this workaround method for tests that depend on | 380 // AtExitManager, so we have this workaround method for tests that depend on |
| 381 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. | 381 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. |
| 382 void DeleteAllSingletons(); | 382 void DeleteAllSingletons(); |
| 383 | 383 |
| 384 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 384 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| OLD | NEW |