4 <script src="../resources/js-test.js"></script>
7 transform: rotate(60deg);
8 transform-origin:20% 40%;
9 transform-style: preserve-3d;
14 transform-origin: inherit;
15 transform-style: inherit;
20 transform-origin: initial;
21 transform-style: initial;
27 <div style="width:500px;height:500px" id="base">
28 <div id="inherit"></div>
29 <div id="initial"></div>
32 description("Test that inherit and initial works on unprefixed transforms.")
34 var testContainer = document.createElement("div");
35 document.body.appendChild(testContainer);
37 e = document.getElementById('inherit');
38 computedStyle = window.getComputedStyle(e, null);
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'");
48 e = document.getElementById('initial');
49 computedStyle = window.getComputedStyle(e, null);
50 debug("Testing initial.");
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'");
59 document.body.removeChild(testContainer);