blob: 3acebc2e4ba16a7e31b19276c6fd281c05fbc949 [file] [log] [blame]
Testing parsing and serialization of <tt>-webkit-transition-timing-function</tt> values.
<pre id="console">
</pre>
<div id="target"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function log(message)
{
var console = document.getElementById("console");
console.appendChild(document.createTextNode(message + "\n"));
}
function roundTripTransitionTimingFunctionValue(value)
{
var element = document.getElementById("target");
element.style.webkitTransitionTimingFunction = value;
if (element.style.webkitTransitionTimingFunction === value)
log("PASS: '" + value + "' parsed and serialized successfully.");
else
log("FAIL: '" + value + "' serialized back as '" + element.style.webkitTransitionTimingFunction + "'.");
}
roundTripTransitionTimingFunctionValue("linear");
roundTripTransitionTimingFunctionValue("ease-in");
roundTripTransitionTimingFunctionValue("ease-out");
roundTripTransitionTimingFunctionValue("ease-in-out");
roundTripTransitionTimingFunctionValue("cubic-bezier(0, 0, 0, 1)");
roundTripTransitionTimingFunctionValue("cubic-bezier(0.1, 0.52, 0.11101, 0.9)");
roundTripTransitionTimingFunctionValue("cubic-bezier(1, 55, 0.3456, 1000)");
roundTripTransitionTimingFunctionValue("cubic-bezier(1, -55, 0.3456, -1000)");
</script>