4 <script src=
"../resources/js-test.js"></script>
7 transition-property: width;
8 transition-duration:
5s;
9 transition-timing-function: linear;
14 transition-property: inherit;
15 transition-duration: inherit;
16 transition-timing-function: inherit;
17 transition-delay: inherit;
21 transition-property: initial;
22 transition-duration: initial;
23 transition-timing-function: initial;
24 transition-delay: initial;
30 <div style=
"width:500px;height:500px" id=
"base">
31 <div id=
"inherit"></div>
32 <div id=
"initial"></div>
35 description("Test that inherit and initial works on unprefixed transitions.")
37 var testContainer
= document
.createElement("div");
38 document
.body
.appendChild(testContainer
);
40 e
= document
.getElementById('inherit');
41 computedStyle
= window
.getComputedStyle(e
, null);
43 debug("Testing inherit.");
44 shouldBe("computedStyle.transitionProperty", "'width'");
45 shouldBe("computedStyle.webkitTransitionProperty", "'width'");
47 shouldBe("computedStyle.transitionDuration", "'5s'");
48 shouldBe("computedStyle.webkitTransitionDuration", "'5s'");
50 shouldBe("computedStyle.transitionTimingFunction", "'linear'");
51 shouldBe("computedStyle.webkitTransitionTimingFunction", "'linear'");
53 shouldBe("computedStyle.transitionDelay", "'2s'");
54 shouldBe("computedStyle.webkitTransitionDelay", "'2s'");
56 e
= document
.getElementById('initial');
57 computedStyle
= window
.getComputedStyle(e
, null);
58 debug("Testing initial.");
60 shouldBe("computedStyle.transitionProperty", "'all'");
61 shouldBe("computedStyle.webkitTransitionProperty", "'all'");
63 shouldBe("computedStyle.transitionDuration", "'0s'");
64 shouldBe("computedStyle.webkitTransitionDuration", "'0s'");
66 shouldBe("computedStyle.transitionTimingFunction", "'ease'");
67 shouldBe("computedStyle.webkitTransitionTimingFunction", "'ease'");
69 shouldBe("computedStyle.transitionDelay", "'0s'");
70 shouldBe("computedStyle.webkitTransitionDelay", "'0s'");
72 document
.body
.removeChild(testContainer
);