OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/cancelable_callback.h" | 7 #include "base/cancelable_callback.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 TestOrderablePendingTask a2 = a; | 49 TestOrderablePendingTask a2 = a; |
50 EXPECT_EQ(a, a2); | 50 EXPECT_EQ(a, a2); |
51 EXPECT_LT(a2, b); | 51 EXPECT_LT(a2, b); |
52 EXPECT_LT(b, c); | 52 EXPECT_LT(b, c); |
53 EXPECT_LT(a2, c); | 53 EXPECT_LT(a2, c); |
54 } | 54 } |
55 | 55 |
56 class OrderedSimpleTaskRunnerTest : public testing::Test { | 56 class OrderedSimpleTaskRunnerTest : public testing::Test { |
57 public: | 57 public: |
58 OrderedSimpleTaskRunnerTest() | 58 OrderedSimpleTaskRunnerTest() |
59 : now_src_(TestNowSource::Create(base::TimeTicks())) { | 59 : now_src_(new base::SimpleTestTickClock()), |
60 task_runner_ = new OrderedSimpleTaskRunner(now_src_, true); | 60 task_runner_(new OrderedSimpleTaskRunner(now_src_.get(), true)) {} |
61 } | |
62 ~OrderedSimpleTaskRunnerTest() override {} | 61 ~OrderedSimpleTaskRunnerTest() override {} |
63 | 62 |
64 protected: | 63 protected: |
65 std::string executed_tasks_; | 64 std::string executed_tasks_; |
66 scoped_refptr<TestNowSource> now_src_; | 65 scoped_ptr<base::SimpleTestTickClock> now_src_; |
67 scoped_refptr<OrderedSimpleTaskRunner> task_runner_; | 66 scoped_refptr<OrderedSimpleTaskRunner> task_runner_; |
68 | 67 |
69 void PostTask(int task_num, base::TimeDelta delay) { | 68 void PostTask(int task_num, base::TimeDelta delay) { |
70 base::Closure test_task = base::Bind(&OrderedSimpleTaskRunnerTest::Task, | 69 base::Closure test_task = base::Bind(&OrderedSimpleTaskRunnerTest::Task, |
71 base::Unretained(this), | 70 base::Unretained(this), |
72 task_num); | 71 task_num); |
73 task_runner_->PostDelayedTask(FROM_HERE, test_task, delay); | 72 task_runner_->PostDelayedTask(FROM_HERE, test_task, delay); |
74 } | 73 } |
75 | 74 |
76 void PostTaskWhichPostsInstantTask(int task_num, base::TimeDelta delay) { | 75 void PostTaskWhichPostsInstantTask(int task_num, base::TimeDelta delay) { |
(...skipping 29 matching lines...) Expand all Loading... |
106 base::Unretained(this), | 105 base::Unretained(this), |
107 task_num, | 106 task_num, |
108 delay); | 107 delay); |
109 task_runner_->PostDelayedTask(FROM_HERE, test_task, delay); | 108 task_runner_->PostDelayedTask(FROM_HERE, test_task, delay); |
110 } | 109 } |
111 | 110 |
112 private: | 111 private: |
113 void Task(int task_num) { | 112 void Task(int task_num) { |
114 if (!executed_tasks_.empty()) | 113 if (!executed_tasks_.empty()) |
115 executed_tasks_ += " "; | 114 executed_tasks_ += " "; |
116 executed_tasks_ += | 115 executed_tasks_ += base::StringPrintf( |
117 base::StringPrintf("%d(%" PRId64 "ms)", | 116 "%d(%" PRId64 "ms)", task_num, |
118 task_num, | 117 (now_src_->NowTicks() - base::TimeTicks()).InMilliseconds()); |
119 now_src_->Now().ToInternalValue() / | |
120 base::Time::kMicrosecondsPerMillisecond); | |
121 } | 118 } |
122 | 119 |
123 void TaskWhichPostsInstantTask(int task_num) { | 120 void TaskWhichPostsInstantTask(int task_num) { |
124 Task(task_num); | 121 Task(task_num); |
125 PostTask(-task_num, base::TimeDelta()); | 122 PostTask(-task_num, base::TimeDelta()); |
126 } | 123 } |
127 | 124 |
128 void TaskWhichPostsDelayedTask(int task_num, base::TimeDelta delay) { | 125 void TaskWhichPostsDelayedTask(int task_num, base::TimeDelta delay) { |
129 Task(task_num); | 126 Task(task_num); |
130 PostTask(-task_num, delay); | 127 PostTask(-task_num, delay); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 task_runner_->SetAutoAdvanceNowToPendingTasks(false); | 266 task_runner_->SetAutoAdvanceNowToPendingTasks(false); |
270 PostTask(1, base::TimeDelta()); | 267 PostTask(1, base::TimeDelta()); |
271 PostTask(2, base::TimeDelta::FromMilliseconds(15)); | 268 PostTask(2, base::TimeDelta::FromMilliseconds(15)); |
272 PostTask(3, base::TimeDelta()); | 269 PostTask(3, base::TimeDelta()); |
273 PostTask(4, base::TimeDelta::FromMilliseconds(8)); | 270 PostTask(4, base::TimeDelta::FromMilliseconds(8)); |
274 | 271 |
275 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunPendingTasks(), "1(0ms) 3(0ms)"); | 272 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunPendingTasks(), "1(0ms) 3(0ms)"); |
276 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunPendingTasks(), ""); | 273 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunPendingTasks(), ""); |
277 EXPECT_EQ(task_runner_->DelayToNextTaskTime(), | 274 EXPECT_EQ(task_runner_->DelayToNextTaskTime(), |
278 base::TimeDelta::FromMilliseconds(8)); | 275 base::TimeDelta::FromMilliseconds(8)); |
279 now_src_->SetNow(base::TimeTicks::FromInternalValue(5000)); | 276 now_src_->Advance(base::TimeDelta::FromMicroseconds(5000)); |
280 EXPECT_EQ(task_runner_->DelayToNextTaskTime(), | 277 EXPECT_EQ(task_runner_->DelayToNextTaskTime(), |
281 base::TimeDelta::FromMilliseconds(3)); | 278 base::TimeDelta::FromMilliseconds(3)); |
282 now_src_->SetNow(base::TimeTicks::FromInternalValue(25000)); | 279 now_src_->Advance(base::TimeDelta::FromMicroseconds(20000)); |
283 EXPECT_EQ(task_runner_->DelayToNextTaskTime(), base::TimeDelta()); | 280 EXPECT_EQ(task_runner_->DelayToNextTaskTime(), base::TimeDelta()); |
284 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunPendingTasks(), "4(25ms) 2(25ms)"); | 281 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunPendingTasks(), "4(25ms) 2(25ms)"); |
285 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunPendingTasks(), ""); | 282 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunPendingTasks(), ""); |
286 } | 283 } |
287 | 284 |
288 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilIdle) { | 285 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilIdle) { |
289 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); | 286 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); |
290 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilIdle(), "1(0ms) -1(0ms)"); | 287 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilIdle(), "1(0ms) -1(0ms)"); |
291 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilIdle(), ""); | 288 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilIdle(), ""); |
292 } | 289 } |
293 | 290 |
294 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilTimeAutoNow) { | 291 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilTimeAutoNow) { |
295 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); | 292 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); |
296 PostTaskWhichPostsInstantTask(2, base::TimeDelta::FromMilliseconds(2)); | 293 PostTaskWhichPostsInstantTask(2, base::TimeDelta::FromMilliseconds(2)); |
297 PostTaskWhichPostsInstantTask(3, base::TimeDelta::FromMilliseconds(3)); | 294 PostTaskWhichPostsInstantTask(3, base::TimeDelta::FromMilliseconds(3)); |
298 | 295 |
299 task_runner_->SetAutoAdvanceNowToPendingTasks(true); | 296 task_runner_->SetAutoAdvanceNowToPendingTasks(true); |
300 | 297 |
301 base::TimeTicks run_at = base::TimeTicks(); | 298 base::TimeTicks run_at = base::TimeTicks(); |
302 | 299 |
303 run_at += base::TimeDelta::FromMilliseconds(2); | 300 run_at += base::TimeDelta::FromMilliseconds(2); |
304 RUN_AND_CHECK_RESULT( | 301 RUN_AND_CHECK_RESULT( |
305 EXPECT_TRUE, RunUntilTime(run_at), "1(0ms) -1(0ms) 2(2ms) -2(2ms)"); | 302 EXPECT_TRUE, RunUntilTime(run_at), "1(0ms) -1(0ms) 2(2ms) -2(2ms)"); |
306 EXPECT_EQ(run_at, now_src_->Now()); | 303 EXPECT_EQ(run_at, now_src_->NowTicks()); |
307 | 304 |
308 run_at += base::TimeDelta::FromMilliseconds(1); | 305 run_at += base::TimeDelta::FromMilliseconds(1); |
309 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), "3(3ms) -3(3ms)"); | 306 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), "3(3ms) -3(3ms)"); |
310 EXPECT_EQ(run_at, now_src_->Now()); | 307 EXPECT_EQ(run_at, now_src_->NowTicks()); |
311 | 308 |
312 run_at += base::TimeDelta::FromMilliseconds(1); | 309 run_at += base::TimeDelta::FromMilliseconds(1); |
313 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), ""); | 310 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), ""); |
314 EXPECT_EQ(run_at, now_src_->Now()); | 311 EXPECT_EQ(run_at, now_src_->NowTicks()); |
315 } | 312 } |
316 | 313 |
317 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilTimeManualNow) { | 314 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilTimeManualNow) { |
318 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); | 315 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); |
319 PostTaskWhichPostsInstantTask(2, base::TimeDelta::FromMilliseconds(2)); | 316 PostTaskWhichPostsInstantTask(2, base::TimeDelta::FromMilliseconds(2)); |
320 PostTaskWhichPostsInstantTask(3, base::TimeDelta::FromMilliseconds(3)); | 317 PostTaskWhichPostsInstantTask(3, base::TimeDelta::FromMilliseconds(3)); |
321 | 318 |
322 task_runner_->SetAutoAdvanceNowToPendingTasks(false); | 319 task_runner_->SetAutoAdvanceNowToPendingTasks(false); |
323 | 320 |
324 base::TimeTicks run_at = base::TimeTicks(); | 321 base::TimeTicks run_at = base::TimeTicks(); |
325 | 322 |
326 run_at += base::TimeDelta::FromMilliseconds(2); | 323 run_at += base::TimeDelta::FromMilliseconds(2); |
327 RUN_AND_CHECK_RESULT( | 324 RUN_AND_CHECK_RESULT( |
328 EXPECT_TRUE, RunUntilTime(run_at), "1(2ms) 2(2ms) -1(2ms) -2(2ms)"); | 325 EXPECT_TRUE, RunUntilTime(run_at), "1(2ms) 2(2ms) -1(2ms) -2(2ms)"); |
329 EXPECT_EQ(run_at, now_src_->Now()); | 326 EXPECT_EQ(run_at, now_src_->NowTicks()); |
330 | 327 |
331 run_at += base::TimeDelta::FromMilliseconds(1); | 328 run_at += base::TimeDelta::FromMilliseconds(1); |
332 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), "3(3ms) -3(3ms)"); | 329 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), "3(3ms) -3(3ms)"); |
333 EXPECT_EQ(run_at, now_src_->Now()); | 330 EXPECT_EQ(run_at, now_src_->NowTicks()); |
334 | 331 |
335 run_at += base::TimeDelta::FromMilliseconds(1); | 332 run_at += base::TimeDelta::FromMilliseconds(1); |
336 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), ""); | 333 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_at), ""); |
337 EXPECT_EQ(run_at, now_src_->Now()); | 334 EXPECT_EQ(run_at, now_src_->NowTicks()); |
338 } | 335 } |
339 | 336 |
340 TEST_F(OrderedSimpleTaskRunnerTest, RunForPeriod) { | 337 TEST_F(OrderedSimpleTaskRunnerTest, RunForPeriod) { |
341 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); | 338 PostTaskWhichPostsInstantTask(1, base::TimeDelta()); |
342 PostTaskWhichPostsInstantTask(2, base::TimeDelta::FromMilliseconds(2)); | 339 PostTaskWhichPostsInstantTask(2, base::TimeDelta::FromMilliseconds(2)); |
343 PostTaskWhichPostsInstantTask(3, base::TimeDelta::FromMilliseconds(3)); | 340 PostTaskWhichPostsInstantTask(3, base::TimeDelta::FromMilliseconds(3)); |
344 | 341 |
345 RUN_AND_CHECK_RESULT(EXPECT_TRUE, | 342 RUN_AND_CHECK_RESULT(EXPECT_TRUE, |
346 RunForPeriod(base::TimeDelta::FromMilliseconds(2)), | 343 RunForPeriod(base::TimeDelta::FromMilliseconds(2)), |
347 "1(0ms) -1(0ms) 2(2ms) -2(2ms)"); | 344 "1(0ms) -1(0ms) 2(2ms) -2(2ms)"); |
348 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(2), | 345 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(2), |
349 now_src_->Now()); | 346 now_src_->NowTicks()); |
350 | 347 |
351 RUN_AND_CHECK_RESULT(EXPECT_FALSE, | 348 RUN_AND_CHECK_RESULT(EXPECT_FALSE, |
352 RunForPeriod(base::TimeDelta::FromMilliseconds(1)), | 349 RunForPeriod(base::TimeDelta::FromMilliseconds(1)), |
353 "3(3ms) -3(3ms)"); | 350 "3(3ms) -3(3ms)"); |
354 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(3), | 351 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(3), |
355 now_src_->Now()); | 352 now_src_->NowTicks()); |
356 | 353 |
357 RUN_AND_CHECK_RESULT( | 354 RUN_AND_CHECK_RESULT( |
358 EXPECT_FALSE, RunForPeriod(base::TimeDelta::FromMilliseconds(1)), ""); | 355 EXPECT_FALSE, RunForPeriod(base::TimeDelta::FromMilliseconds(1)), ""); |
359 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(4), | 356 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(4), |
360 now_src_->Now()); | 357 now_src_->NowTicks()); |
361 } | 358 } |
362 | 359 |
363 TEST_F(OrderedSimpleTaskRunnerTest, RunTasksWhileWithCallback) { | 360 TEST_F(OrderedSimpleTaskRunnerTest, RunTasksWhileWithCallback) { |
364 base::Callback<bool(void)> return_true = base::Bind(&ReturnTrue); | 361 base::Callback<bool(void)> return_true = base::Bind(&ReturnTrue); |
365 base::Callback<bool(void)> return_false = base::Bind(&ReturnFalse); | 362 base::Callback<bool(void)> return_false = base::Bind(&ReturnFalse); |
366 | 363 |
367 PostTask(1, base::TimeDelta()); | 364 PostTask(1, base::TimeDelta()); |
368 | 365 |
369 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunTasksWhile(return_false), ""); | 366 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunTasksWhile(return_false), ""); |
370 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunTasksWhile(return_true), "1(0ms)"); | 367 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunTasksWhile(return_true), "1(0ms)"); |
371 } | 368 } |
372 | 369 |
373 TEST_F(OrderedSimpleTaskRunnerTest, EmptyTaskList) { | 370 TEST_F(OrderedSimpleTaskRunnerTest, EmptyTaskList) { |
374 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunPendingTasks(), ""); | 371 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunPendingTasks(), ""); |
375 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilIdle(), ""); | 372 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilIdle(), ""); |
376 | 373 |
377 ASSERT_EQ(base::TimeTicks(), now_src_->Now()); | 374 ASSERT_EQ(base::TimeTicks(), now_src_->NowTicks()); |
378 | 375 |
379 RUN_AND_CHECK_RESULT( | 376 RUN_AND_CHECK_RESULT( |
380 EXPECT_FALSE, RunUntilTime(base::TimeTicks::FromInternalValue(100)), ""); | 377 EXPECT_FALSE, RunUntilTime(base::TimeTicks::FromInternalValue(100)), ""); |
381 EXPECT_EQ(base::TimeTicks::FromInternalValue(100), now_src_->Now()); | 378 EXPECT_EQ(base::TimeTicks::FromInternalValue(100), now_src_->NowTicks()); |
382 | 379 |
383 RUN_AND_CHECK_RESULT( | 380 RUN_AND_CHECK_RESULT( |
384 EXPECT_FALSE, RunForPeriod(base::TimeDelta::FromInternalValue(100)), ""); | 381 EXPECT_FALSE, RunForPeriod(base::TimeDelta::FromInternalValue(100)), ""); |
385 EXPECT_EQ(base::TimeTicks::FromInternalValue(200), now_src_->Now()); | 382 EXPECT_EQ(base::TimeTicks::FromInternalValue(200), now_src_->NowTicks()); |
386 | 383 |
387 base::Callback<bool(void)> return_true = base::Bind(&ReturnTrue); | 384 base::Callback<bool(void)> return_true = base::Bind(&ReturnTrue); |
388 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunTasksWhile(return_true), ""); | 385 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunTasksWhile(return_true), ""); |
389 } | 386 } |
390 | 387 |
391 TEST_F(OrderedSimpleTaskRunnerTest, RunPendingTasksTimeout) { | 388 TEST_F(OrderedSimpleTaskRunnerTest, RunPendingTasksTimeout) { |
392 PostTask(1, base::TimeDelta()); | 389 PostTask(1, base::TimeDelta()); |
393 PostTask(2, base::TimeDelta()); | 390 PostTask(2, base::TimeDelta()); |
394 PostTask(3, base::TimeDelta()); | 391 PostTask(3, base::TimeDelta()); |
395 PostTask(4, base::TimeDelta()); | 392 PostTask(4, base::TimeDelta()); |
(...skipping 25 matching lines...) Expand all Loading... |
421 | 418 |
422 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilTimeout) { | 419 TEST_F(OrderedSimpleTaskRunnerTest, RunUntilTimeout) { |
423 base::TimeTicks run_to = base::TimeTicks() + base::TimeDelta::FromSeconds(1); | 420 base::TimeTicks run_to = base::TimeTicks() + base::TimeDelta::FromSeconds(1); |
424 | 421 |
425 PostTask(1, base::TimeDelta::FromMilliseconds(1)); | 422 PostTask(1, base::TimeDelta::FromMilliseconds(1)); |
426 PostTask(2, base::TimeDelta::FromMilliseconds(2)); | 423 PostTask(2, base::TimeDelta::FromMilliseconds(2)); |
427 PostTask(3, base::TimeDelta::FromMilliseconds(3)); | 424 PostTask(3, base::TimeDelta::FromMilliseconds(3)); |
428 PostTask(4, base::TimeDelta::FromMilliseconds(4)); | 425 PostTask(4, base::TimeDelta::FromMilliseconds(4)); |
429 PostTask(5, base::TimeDelta::FromMilliseconds(5)); | 426 PostTask(5, base::TimeDelta::FromMilliseconds(5)); |
430 | 427 |
431 EXPECT_EQ(base::TimeTicks(), now_src_->Now()); | 428 EXPECT_EQ(base::TimeTicks(), now_src_->NowTicks()); |
432 task_runner_->SetRunTaskLimit(3); | 429 task_runner_->SetRunTaskLimit(3); |
433 RUN_AND_CHECK_RESULT( | 430 RUN_AND_CHECK_RESULT( |
434 EXPECT_TRUE, RunUntilTime(run_to), "1(1ms) 2(2ms) 3(3ms)"); | 431 EXPECT_TRUE, RunUntilTime(run_to), "1(1ms) 2(2ms) 3(3ms)"); |
435 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(3), | 432 EXPECT_EQ(base::TimeTicks() + base::TimeDelta::FromMilliseconds(3), |
436 now_src_->Now()); | 433 now_src_->NowTicks()); |
437 | 434 |
438 task_runner_->SetRunTaskLimit(0); | 435 task_runner_->SetRunTaskLimit(0); |
439 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunUntilTime(run_to), ""); | 436 RUN_AND_CHECK_RESULT(EXPECT_TRUE, RunUntilTime(run_to), ""); |
440 | 437 |
441 task_runner_->SetRunTaskLimit(100); | 438 task_runner_->SetRunTaskLimit(100); |
442 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_to), "4(4ms) 5(5ms)"); | 439 RUN_AND_CHECK_RESULT(EXPECT_FALSE, RunUntilTime(run_to), "4(4ms) 5(5ms)"); |
443 EXPECT_EQ(run_to, now_src_->Now()); | 440 EXPECT_EQ(run_to, now_src_->NowTicks()); |
444 } | 441 } |
445 | 442 |
446 } // namespace cc | 443 } // namespace cc |
OLD | NEW |