OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "config.h" | |
6 | |
7 #include "CCSchedulerTestCommon.h" | |
8 | |
9 namespace WebKitTests { | |
10 | |
11 void FakeCCTimeSourceClient::onTimerTick() | |
12 { | |
13 m_tickCalled = true; | |
14 } | |
15 | |
16 FakeCCThread::FakeCCThread() | |
17 { | |
18 reset(); | |
19 } | |
20 | |
21 FakeCCThread::~FakeCCThread() | |
22 { | |
23 } | |
24 | |
25 void FakeCCThread::postTask(PassOwnPtr<Task>) | |
26 { | |
27 ASSERT_NOT_REACHED(); | |
28 } | |
29 | |
30 void FakeCCThread::postDelayedTask(PassOwnPtr<Task> task, long long delay) | |
31 { | |
32 if (m_runPendingTaskOnOverwrite && hasPendingTask()) | |
33 runPendingTask(); | |
34 | |
35 EXPECT_TRUE(!hasPendingTask()); | |
36 m_pendingTask = task; | |
37 m_pendingTaskDelay = delay; | |
38 } | |
39 | |
40 base::PlatformThreadId FakeCCThread::threadID() const | |
41 { | |
42 return 0; | |
43 } | |
44 | |
45 void FakeCCTimeSource::setClient(cc::CCTimeSourceClient* client) | |
46 { | |
47 m_client = client; | |
48 } | |
49 | |
50 void FakeCCTimeSource::setActive(bool b) | |
51 { | |
52 m_active = b; | |
53 } | |
54 | |
55 bool FakeCCTimeSource::active() const | |
56 { | |
57 return m_active; | |
58 } | |
59 | |
60 base::TimeTicks FakeCCTimeSource::lastTickTime() | |
61 { | |
62 return base::TimeTicks(); | |
63 } | |
64 | |
65 base::TimeTicks FakeCCTimeSource::nextTickTime() | |
66 { | |
67 return base::TimeTicks(); | |
68 } | |
69 | |
70 base::TimeTicks FakeCCDelayBasedTimeSource::now() const | |
71 { | |
72 return m_now; | |
73 } | |
74 | |
75 } | |
OLD | NEW |