blob: b11a08c858cdc65d259bde1b81dec688204ae936 [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: 50px;
width: 50px;
background-color: green;
-webkit-transition: left 4s linear 1s;
}
.moved {
left: 200px;
}
</style>
<script type="text/javascript" charset="utf-8">
function endTest() {
if (window.layoutTestController) {
layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target");
var left = window.getComputedStyle(document.getElementById('target')).left;
var result = "PASS";
if (left != "125px") {
result = "FAIL - expected 125px got " + left;
}
document.getElementById('result').innerHTML = "<p>" + result + "</p>";
layoutTestController.notifyDone();
}
}
function startTest() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
document.getElementById("target").className = "moved";
window.setTimeout(endTest, 0);
}
</script>
</head>
<body onload="startTest()">
<h1>Test for transition shorthand</h1>
<p>This test works only in DumpRenderTree. It uses an API exposed
only there to jump to a particular time in a running transition.
Tests bug <a href="https://bugs.webkit.org/show_bug.cgi?id=21247">21247</a>
</p>
<div id="target">
</div>
<div id="result">
</div>
</body>
</html>