| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/test/scheduler_test_common.h" | 7 #include "cc/test/scheduler_test_common.h" |
| 8 | 8 |
| 9 #include "base/logging.h" |
| 10 |
| 9 namespace WebKitTests { | 11 namespace WebKitTests { |
| 10 | 12 |
| 11 void FakeCCTimeSourceClient::onTimerTick() | 13 void FakeCCTimeSourceClient::onTimerTick() |
| 12 { | 14 { |
| 13 m_tickCalled = true; | 15 m_tickCalled = true; |
| 14 } | 16 } |
| 15 | 17 |
| 16 FakeCCThread::FakeCCThread() | 18 FakeCCThread::FakeCCThread() |
| 17 { | 19 { |
| 18 reset(); | 20 reset(); |
| 19 } | 21 } |
| 20 | 22 |
| 21 FakeCCThread::~FakeCCThread() | 23 FakeCCThread::~FakeCCThread() |
| 22 { | 24 { |
| 23 } | 25 } |
| 24 | 26 |
| 25 void FakeCCThread::postTask(PassOwnPtr<Task>) | 27 void FakeCCThread::postTask(PassOwnPtr<Task>) |
| 26 { | 28 { |
| 27 ASSERT_NOT_REACHED(); | 29 NOTREACHED(); |
| 28 } | 30 } |
| 29 | 31 |
| 30 void FakeCCThread::postDelayedTask(PassOwnPtr<Task> task, long long delay) | 32 void FakeCCThread::postDelayedTask(PassOwnPtr<Task> task, long long delay) |
| 31 { | 33 { |
| 32 if (m_runPendingTaskOnOverwrite && hasPendingTask()) | 34 if (m_runPendingTaskOnOverwrite && hasPendingTask()) |
| 33 runPendingTask(); | 35 runPendingTask(); |
| 34 | 36 |
| 35 EXPECT_TRUE(!hasPendingTask()); | 37 EXPECT_TRUE(!hasPendingTask()); |
| 36 m_pendingTask = task; | 38 m_pendingTask = task; |
| 37 m_pendingTaskDelay = delay; | 39 m_pendingTaskDelay = delay; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 66 { | 68 { |
| 67 return base::TimeTicks(); | 69 return base::TimeTicks(); |
| 68 } | 70 } |
| 69 | 71 |
| 70 base::TimeTicks FakeCCDelayBasedTimeSource::now() const | 72 base::TimeTicks FakeCCDelayBasedTimeSource::now() const |
| 71 { | 73 { |
| 72 return m_now; | 74 return m_now; |
| 73 } | 75 } |
| 74 | 76 |
| 75 } | 77 } |
| OLD | NEW |