blob: 4a59725d0c98662064274535f09409444a628eef [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;
}
#target {
position: relative;
top: 100px;
left: 100px;
width: 200px;
height: 200px;
background-color: red;
-webkit-transition-property: left;
-webkit-transition-duration: 0s;
-webkit-transition-delay: 0.5s;
}
</style>
<script type="text/javascript" charset="utf-8">
function finishTest() {
var expected = 200;
var current = parseInt(window.getComputedStyle(document.getElementById('target')).left);
if (current == expected)
document.getElementById('result').innerHTML = "PASS - left property is " + current + "px as expected";
else
document.getElementById('result').innerHTML = "FAIL - left property is " + current + "px instead of " + expected + "px";
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function runTest() {
window.setTimeout(finishTest, 1000);
}
function startTest() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
var target = document.getElementById('target');
target.style.left = '200px';
window.setTimeout(runTest, 0);
}
</script>
</head>
<body onload="startTest()">
<h1>Test that transitions with a zero-duration and but a non-zero delay effectively work</h1>
<div id="target">
</div>
<div id="result">
</div>
</body>
</html>