blob: 0e944ed7929a9b6e4a7d407a248043d706f89578 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#target {
position: relative;
left: 100px;
height: 100px;
width: 100px;
background-color: blue;
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: linear;
}
@-webkit-keyframes bounce {
from {
left: 100px;
}
to {
left: 200px;
}
}
</style>
<script src="resources/animation-test-helpers.js"></script>
<script>
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
layoutTestController.dumpAsText();
}
function animationStarted()
{
if (window.layoutTestController) {
var paused = layoutTestController.pauseAnimationAtTimeOnElementWithId("bounce", 1.0, "target");
var result = "";
if (paused)
result = "PASS: correctly paused animation";
else
result = "FAIL: failed to pause animation";
document.getElementById('results').innerText = result;
layoutTestController.notifyDone();
} else
document.getElementById('results').innerText = "This test requires DRT";
}
function startTest()
{
var target = document.getElementById('target');
target.style.webkitAnimationName = "bounce";
waitForAnimationToStart(target, animationStarted);
}
</script>
</head>
<body onload="startTest()">
<!-- Test for DRT pauseAnimationAtTimeOnElementWithId() API -->
<div id="target"></div>
<div id="results"></div>
</body>
</html>