blob: 6ea029e24f76053838125097061d7f4e2b40689c [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/timeline-test.js"></script>
<script>
function performActions()
{
var element = document.getElementById("animation");
var requestId = window.requestAnimationFrame(animationFrameCallback, element);
function animationFrameCallback()
{
window.cancelAnimationFrame(requestId);
}
if (window.testRunner)
testRunner.display();
}
function test()
{
InspectorTest.startTimeline(function() {
InspectorTest.evaluateInPage("performActions()");
});
InspectorTest.waitForRecordType("CancelAnimationFrame", finish);
function finish()
{
InspectorTest.printTimelineRecords("RequestAnimationFrame");
InspectorTest.printTimelineRecords("FireAnimationFrame");
InspectorTest.printTimelineRecords("CancelAnimationFrame");
InspectorTest.completeTest();
}
}
if (!window.testRunner)
setTimeout(performActions, 2000);
</script>
</head>
<body onload="runTest()">
<p>
Tests the Timeline events for Animation Frame feature
</p>
<div id="animation">
</div>
</body>
</html>