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