Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / transition-inherit-initial-unprefixed.html
blobd64e2d2c986530bf58c9b0aab4780f2da094e2f4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <style>
6 #base {
7 transition-property: width;
8 transition-duration: 5s;
9 transition-timing-function: linear;
10 transition-delay: 2s;
13 #inherit {
14 transition-property: inherit;
15 transition-duration: inherit;
16 transition-timing-function: inherit;
17 transition-delay: inherit;
20 #initial {
21 transition-property: initial;
22 transition-duration: initial;
23 transition-timing-function: initial;
24 transition-delay: initial;
27 </style>
28 </head>
29 <body>
30 <div style="width:500px;height:500px" id="base">
31 <div id="inherit"></div>
32 <div id="initial"></div>
33 </div>
34 <script>
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);
73 </script>
74 </body>
75 </html>