Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / transforms / transform-inherit-initial-unprefixed.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <style>
6 #base {
7     transform: rotate(60deg);
8     transform-origin:20% 40%;
9     transform-style: preserve-3d;
10 }
11
12 #inherit {
13     transform: inherit;
14     transform-origin: inherit;
15     transform-style: inherit;
16 }
17
18 #initial {
19     transform: initial;
20     transform-origin: initial;
21     transform-style: initial;
22 }
23
24 </style>
25 </head>
26 <body>
27 <div style="width:500px;height:500px" id="base">
28     <div id="inherit"></div>
29     <div id="initial"></div>
30 </div>
31 <script>
32 description("Test that inherit and initial works on unprefixed transforms.")
33
34 var testContainer = document.createElement("div");
35 document.body.appendChild(testContainer);
36
37 e = document.getElementById('inherit');
38 computedStyle = window.getComputedStyle(e, null);
39
40 debug("Testing inherit.");
41 shouldBe("computedStyle.transform", "'matrix(0.5000000000000001, 0.8660254037844386, -0.8660254037844386, 0.5000000000000001, 0, 0)'");
42 shouldBe("computedStyle.webkitTransform", "'matrix(0.5000000000000001, 0.8660254037844386, -0.8660254037844386, 0.5000000000000001, 0, 0)'");
43 shouldBe("computedStyle.transformOrigin", "'100px 0px'");
44 shouldBe("computedStyle.webkitTransformOrigin", "'100px 0px'");
45 shouldBe("computedStyle.transformStyle", "'preserve-3d'");
46 shouldBe("computedStyle.webkitTransformStyle", "'preserve-3d'");
47
48 e = document.getElementById('initial');
49 computedStyle = window.getComputedStyle(e, null);
50 debug("Testing initial.");
51
52 shouldBe("computedStyle.transform", "'none'");
53 shouldBe("computedStyle.webkitTransform", "'none'");
54 shouldBe("computedStyle.transformOrigin", "'250px 0px'");
55 shouldBe("computedStyle.webkitTransformOrigin", "'250px 0px'");
56 shouldBe("computedStyle.transformStyle", "'flat'");
57 shouldBe("computedStyle.webkitTransformStyle", "'flat'");
58
59 document.body.removeChild(testContainer);
60 </script>
61 </body>
62 </html>