Chromium Code Reviews| Index: cc/test/scheduler_test_common.cc |
| diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc |
| index b2bedd86fd942c95563403789eba949796638f3c..4d2c13c0db6ce40dbaf13b57df0129efa01ea9fe 100644 |
| --- a/cc/test/scheduler_test_common.cc |
| +++ b/cc/test/scheduler_test_common.cc |
| @@ -24,24 +24,31 @@ FakeThread::~FakeThread() |
| { |
| } |
| -void FakeThread::postTask(PassOwnPtr<Task>) |
| +void FakeThread::runPendingTask() |
| { |
| - NOTREACHED(); |
| + ASSERT_TRUE(m_pendingTask); |
| + scoped_ptr<base::Closure> task = m_pendingTask.Pass(); |
| + task->Run(); |
| } |
| -void FakeThread::postDelayedTask(PassOwnPtr<Task> task, long long delay) |
| +void FakeThread::postTask(base::Closure cb) |
| +{ |
| + postDelayedTask(cb, 0); |
|
enne (OOO)
2012/10/29 17:40:42
Why did this change from NOTREACHED() to postDelay
|
| +} |
| + |
| +void FakeThread::postDelayedTask(base::Closure cb, long long delay) |
| { |
| if (m_runPendingTaskOnOverwrite && hasPendingTask()) |
| runPendingTask(); |
| - EXPECT_TRUE(!hasPendingTask()); |
| - m_pendingTask = task; |
| + ASSERT_FALSE(hasPendingTask()); |
| + m_pendingTask.reset(new base::Closure(cb)); |
| m_pendingTaskDelay = delay; |
| } |
| -base::PlatformThreadId FakeThread::threadID() const |
| +bool FakeThread::belongsToCurrentThread() const |
| { |
| - return 0; |
| + return true; |
| } |
| void FakeTimeSource::setClient(cc::TimeSourceClient* client) |