DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (a81015259a98)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=525530
-->
<head>
  <title>Test for Bug 525530</title>
  <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");

/** 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");

</script>
</pre>
</body>
</html>