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 background-color: red; |
| 9 } |
| 10 </style> |
| 11 <script> |
| 12 function runTest() { |
| 13 testRunnerGeometryLogging([{ |
| 14 func: function(el) { |
| 15 el.style.width = '100px'; |
| 16 el.style.height = '100px'; |
| 17 el.style.background = 'paint(logging-green) top left/50% 50% repeat-
x'; |
| 18 }, |
| 19 expected: {width: 50, height: 50}, |
| 20 }, { |
| 21 func: function(el) { |
| 22 el.style.width = '100px'; |
| 23 el.style.height = '100px'; |
| 24 el.style.background = 'paint(logging-green) center right/50% 20% no-
repeat'; |
| 25 }, |
| 26 expected: {width: 50, height: 20}, |
| 27 }, { |
| 28 func: function(el) { |
| 29 el.style.width = '100px'; |
| 30 el.style.height = '100px'; |
| 31 el.style.background = 'paint(logging-green) center center/60px 80px
no-repeat'; |
| 32 }, |
| 33 expected: {width: 60, height: 80}, |
| 34 }]); |
| 35 } |
| 36 </script> |
| 37 </head> |
| 38 <body onload="runTest()"> |
| 39 <p>This tests the geometry information in the paint callback.</p> |
| 40 <p>See the devtools console for test output.</p> |
| 41 </body> |
| 42 </html> |
OLD | NEW |