2009-12-11 16:13:19 +00:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=525530
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 525530</title>
|
|
|
|
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=525530">Mozilla Bug 525530</a>
|
|
|
|
<p id="display" style="text-indent: 100px"></p>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 525530 **/
|
|
|
|
|
|
|
|
var p = document.getElementById("display");
|
|
|
|
var cs = getComputedStyle(p, "");
|
|
|
|
|
|
|
|
p.style.MozTransitionProperty = "all";
|
|
|
|
p.style.MozTransitionDuration = "4s";
|
|
|
|
p.style.MozTransitionDelay = "-2s";
|
|
|
|
p.style.MozTransitionTimingFunction = "linear";
|
|
|
|
|
|
|
|
is(cs.textIndent, "100px", "initial value");
|
|
|
|
|
|
|
|
p.style.textIndent = "0";
|
|
|
|
is(cs.textIndent, "50px", "transition is halfway");
|
|
|
|
p.style.MozTransitionDuration = "0s";
|
|
|
|
is(cs.textIndent, "50px", "changing duration doesn't change transitioning");
|
|
|
|
p.style.MozTransitionDelay = "0s";
|
|
|
|
is(cs.textIndent, "50px", "changing delay doesn't change transitioning");
|
|
|
|
p.style.MozTransitionProperty = "text-indent";
|
|
|
|
is(cs.textIndent, "50px",
|
|
|
|
"irrelevant change to transition property doesn't change transitioning");
|
|
|
|
p.style.MozTransitionProperty = "font";
|
|
|
|
is(cs.textIndent, "0px",
|
|
|
|
"relevant change to transition property does change transitioning");
|
|
|
|
|
2009-12-21 21:46:25 +00:00
|
|
|
/** Test for Bug 522643 */
|
|
|
|
p.style.MozTransitionDuration = "4s";
|
|
|
|
p.style.MozTransitionDelay = "-2s";
|
|
|
|
p.style.MozTransitionProperty = "text-indent";
|
|
|
|
p.style.textIndent = "100px";
|
|
|
|
is(cs.textIndent, "50px", "transition is halfway");
|
|
|
|
p.style.MozTransitionDuration = "0s";
|
|
|
|
p.style.MozTransitionDelay = "0s";
|
|
|
|
is(cs.textIndent, "50px",
|
|
|
|
"changing duration and delay doesn't change transitioning");
|
|
|
|
p.style.textIndent = "0px";
|
|
|
|
is(cs.textIndent, "0px",
|
|
|
|
"changing property after changing duration and delay stops transition");
|
|
|
|
|
2009-12-11 16:13:19 +00:00
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|