blob: e956b5d603c42c42cf53b4fd32295f3e721236f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "cc/test/scheduler_test_common.h"
#include "base/logging.h"
namespace WebKitTests {
void FakeCCTimeSourceClient::onTimerTick()
{
m_tickCalled = true;
}
FakeCCThread::FakeCCThread()
{
reset();
}
FakeCCThread::~FakeCCThread()
{
}
void FakeCCThread::postTask(PassOwnPtr<Task>)
{
NOTREACHED();
}
void FakeCCThread::postDelayedTask(PassOwnPtr<Task> task, long long delay)
{
if (m_runPendingTaskOnOverwrite && hasPendingTask())
runPendingTask();
EXPECT_TRUE(!hasPendingTask());
m_pendingTask = task;
m_pendingTaskDelay = delay;
}
base::PlatformThreadId FakeCCThread::threadID() const
{
return 0;
}
void FakeCCTimeSource::setClient(cc::CCTimeSourceClient* client)
{
m_client = client;
}
void FakeCCTimeSource::setActive(bool b)
{
m_active = b;
}
bool FakeCCTimeSource::active() const
{
return m_active;
}
base::TimeTicks FakeCCTimeSource::lastTickTime()
{
return base::TimeTicks();
}
base::TimeTicks FakeCCTimeSource::nextTickTime()
{
return base::TimeTicks();
}
base::TimeTicks FakeCCDelayBasedTimeSource::now() const
{
return m_now;
}
}
|