blob: 779a806af44633bc6e7c562dc7c3736302d3e0b1 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body {
margin: 0;
}
div {
position: relative;
left: 100px;
height: 200px;
width: 200px;
background-color: red;
-webkit-transition-property: left;
-webkit-transition-duration: 4s;
-webkit-transition-timing-function: linear;
}
.moved {
left: 200px;
}
</style>
<script type="text/javascript" charset="utf-8">
function endTest() {
if (window.layoutTestController) {
if (!layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 1.0, "target"))
throw("Transition is not running");
layoutTestController.notifyDone();
}
}
function startTest() {
if (window.layoutTestController)
layoutTestController.waitUntilDone();
document.getElementById("target").className = "moved";
window.setTimeout(endTest, 0);
}
</script>
</head>
<body onload="startTest()">
<h1>Test for DRT pauseTransitionAtTimeOnElementWithId() API</h1>
<div id="target">
</div>
</body>
</html>