OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <title>webkitConvertPointFromNodeToPage Test</title> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 <style type="text/css" media="screen"> | |
6 | |
7 #test { | |
8 position: absolute; | |
9 left: 10px; | |
10 top: 10px; | |
11 width: 50px; | |
12 height: 50px; | |
13 background-color: blue; | |
14 } | |
15 | |
16 </style> | |
17 | |
18 <script type="text/javascript" charset="utf-8"> | |
19 function doTest() | |
20 { | |
21 description("This test exercises the webkitConvertPointFromNodeToPage()
function after changing the transform."); | |
22 | |
23 var node = document.getElementById('test'); | |
24 node.style.webkitTransform = 'translate(50px, 60px)'; | |
25 var p = webkitConvertPointFromNodeToPage(node, new WebKitPoint(0, 0)); | |
26 x = Math.round(p.x); | |
27 y = Math.round(p.y); | |
28 shouldBe('x', 60 + ""); | |
29 shouldBe('y', 70 + ""); | |
30 | |
31 isSuccessfullyParsed(); | |
32 } | |
33 | |
34 window.onload = doTest; | |
35 </script> | |
36 | |
37 </head> | |
38 <body> | |
39 <div id="test"></div> | |
40 | |
41 <div id="description" style="margin-top: 200px"></div> | |
42 <div id="console"></div> | |
43 </body> | |
44 </html> | |
OLD | NEW |