tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / transforms / 2d / computed-style-origin.html
1 <html>
2 <head>
3 <style type="text/css" media="screen">
4     #test1 {
5         width: 20px;
6         height: 20px;
7         background-color: blue;
8         position: relative;
9         -webkit-transform: translate(0);
10         // default transform origin
11     }
12     #test2 {
13         width: 20px;
14         height: 20px;
15         background-color: blue;
16         position: relative;
17         -webkit-transform: translate(0);
18         -webkit-transform-origin: 50% 50%;
19     }
20     #test3 {
21         width: 20px;
22         height: 20px;
23         background-color: blue;
24         position: relative;
25         -webkit-transform: translate(0);
26         -webkit-transform-origin: 0% 100%;
27     }
28     #test4 {
29         width: 20px;
30         height: 20px;
31         background-color: blue;
32         position: relative;
33         -webkit-transform: translate(0);
34         -webkit-transform-origin: 5px 7px;
35     }
36 </style>
37 <script src="../../fast/js/resources/js-test-pre.js"></script>
38 </head>
39 <body>
40 <p id="test1"></p>
41 <p id="test2"></p>
42 <p id="test3"></p>
43 <p id="test4"></p>
44 <p id="description"></p>
45 <div id="console"></div>
46 <script>
47
48 description("This tests computed style values for transform origin.");
49
50 var test1 = document.getElementById("test1");
51 var test2 = document.getElementById("test2");
52 var test3 = document.getElementById("test3");
53 var test4 = document.getElementById("test4");
54
55 var test1Style = window.getComputedStyle(test1);
56 var test2Style = window.getComputedStyle(test2);
57 var test3Style = window.getComputedStyle(test3);
58 var test4Style = window.getComputedStyle(test4);
59
60 shouldBe("test1Style.webkitTransformOrigin", "'10px 10px'");
61 shouldBe("test2Style.webkitTransformOrigin", "'10px 10px'");
62 shouldBe("test3Style.webkitTransformOrigin", "'0px 20px'");
63 shouldBe("test4Style.webkitTransformOrigin", "'5px 7px'");
64
65 debug("");
66
67 </script>
68 <script src="../../fast/js/resources/js-test-post.js"></script>
69 </body>
70 </html>