OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../resources/run-after-layout-and-paint.js"></script> | |
5 <script src="resources/test-runner-geometry-logging.js"></script> | |
6 <style> | |
7 div { | |
8 border: solid 0; | |
9 border-image: paint(logging-green); | |
10 border-image-slice: 0 fill; | |
11 background-color: red; | |
12 } | |
13 </style> | |
14 <script> | |
15 function runTest() { | |
16 testRunnerGeometryLogging([{ | |
17 func: function(el) { | |
18 el.style.width = '100px'; | |
19 el.style.height = '100px'; | |
20 }, | |
21 expected: {width: 100, height: 100}, | |
22 }, { | |
23 func: function(el) { | |
24 el.style.width = '200px'; | |
25 el.style.height = '200px'; | |
26 el.style.borderWidth = '10px'; | |
27 }, | |
28 expected: {width: 220, height: 220}, | |
29 }, { | |
30 func: function(el) { | |
31 el.style.width = '50px'; | |
32 el.style.height = '50px'; | |
33 el.style.borderImageOutset = '20px'; | |
34 }, | |
35 expected: {width: 90, height: 90}, | |
36 }, { | |
37 func: function(el) { | |
38 el.style.width = '60px'; | |
39 el.style.height = '100px'; | |
40 el.style.borderImageOutset = '10px'; | |
41 }, | |
42 expected: {width: 80, height: 120}, | |
43 }, { | |
44 func: function(el) { | |
45 el.style.width = '100px'; | |
46 el.style.height = '100px'; | |
47 el.style.borderWidth = '10px'; | |
48 el.style.borderImageOutset = '10px'; | |
49 }, | |
50 expected: {width: 140, height: 140}, | |
51 }, { | |
52 func: function(el) { | |
53 el.style.width = '100px'; | |
54 el.style.height = '100px'; | |
55 el.style.borderImageOutset = '10px'; | |
56 if (window.internals) | |
57 window.internals.setPageScaleFactor(2); | |
58 }, | |
59 expected: {width: 120, height: 120}, | |
60 }]); | |
61 } | |
62 </script> | |
63 </head> | |
64 <body onload="runTest()"> | |
65 <p>This tests the geometry information in the paint callback.</p> | |
66 <p>See the devtools console for test output.</p> | |
67 </body> | |
68 </html> | |
OLD | NEW |