| 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-paint-worklet.js"></script> | |
| 6 <script src="resources/generate-paint-style-logging.js"></script> | |
| 7 <style> | |
| 8 div { | |
| 9 color: rgb(0, 255, 0); | |
| 10 line-height: 1px; | |
| 11 } | |
| 12 | |
| 13 div::first-letter { | |
| 14 background-image: paint(test); | |
| 15 color: rgb(255, 0, 0); | |
| 16 line-height: 2px; | |
| 17 } | |
| 18 </style> | |
| 19 </head> | |
| 20 <body> | |
| 21 <div>Foo</div> | |
| 22 <script> | |
| 23 if (window.testRunner) | |
| 24 testRunner.dumpAsText(); | |
| 25 | |
| 26 importPaintWorkletAndTerminateTestAfterAsyncPaint( | |
| 27 generatePaintStyleLogging([ | |
| 28 'color', | |
| 29 'line-height', | |
| 30 ])); | |
| 31 </script> | |
| 32 <p>This tests the style information in the paint callback.</p> | |
| 33 <p>See the devtools console for test output. The console should log:</p> | |
| 34 color: [CSSStyleValue=rgb(255, 0, 0)]<br> | |
| 35 line-height: [CSSSimpleLength=2px]<br> | |
| 36 </body> | |
| 37 </html> | |
| OLD | NEW |