| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/run-after-layout-and-paint.js"></script> | 4 <script src="../resources/run-after-layout-and-paint.js"></script> |
| 5 <script src="resources/test-runner-paint-worklet.js"></script> | 5 <script src="resources/test-runner-paint-worklet.js"></script> |
| 6 <script src="resources/generate-paint-style-logging.js"></script> | 6 <script src="resources/generate-paint-style-logging.js"></script> |
| 7 <style> | 7 <style> |
| 8 div { | 8 div { |
| 9 border-radius: 3px; | |
| 10 } | |
| 11 | |
| 12 div::before { | |
| 13 width: 100px; | 9 width: 100px; |
| 14 height: 100px; | 10 height: 100px; |
| 15 content: 'foo'; | |
| 16 | 11 |
| 17 background-image: paint(test); | 12 background-image: paint(test); |
| 18 border-radius: 2px; | 13 |
| 19 --foo: bar; | 14 --length: 10px; |
| 15 --number: 10; |
| 20 } | 16 } |
| 21 </style> | 17 </style> |
| 22 </head> | 18 </head> |
| 23 <body> | 19 <body> |
| 24 <div></div> | 20 <div></div> |
| 25 <script> | 21 <script> |
| 26 if (window.testRunner) | 22 if (window.testRunner) |
| 27 testRunner.dumpAsText(); | 23 testRunner.dumpAsText(); |
| 28 | 24 |
| 25 CSS.registerProperty({name: '--length', syntax: '<length>', initialValue: '0
px'}); |
| 26 CSS.registerProperty({name: '--length-initial', syntax: '<length>', initialV
alue: '20px'}); |
| 27 CSS.registerProperty({name: '--number', syntax: '<number>', initialValue: '0
'}); |
| 28 |
| 29 importPaintWorkletAndTerminateTestAfterAsyncPaint( | 29 importPaintWorkletAndTerminateTestAfterAsyncPaint( |
| 30 generatePaintStyleLogging([ | 30 generatePaintStyleLogging([ |
| 31 '--bar', | 31 '--length', |
| 32 '--foo', | 32 '--length-initial', |
| 33 'border-radius', | 33 '--number', |
| 34 ])); | 34 ])); |
| 35 </script> | 35 </script> |
| 36 <p>This tests the style information in the paint callback.</p> | 36 <p>This tests the style information in the paint callback.</p> |
| 37 <p>See the devtools console for test output. The console should log:</p> | 37 <p>See the devtools console for test output. The console should log:</p> |
| 38 --bar: [null]<br> | 38 --length: [CSSSimpleLength=10px]<br> |
| 39 --foo: bar<br> | 39 --length-initial: [CSSSimpleLength=20px]<br> |
| 40 border-radius: 2px | 40 --number: [CSSNumberValue=10]<br> |
| 41 </body> | 41 |
| 42 </html> | 42 </html> |
| OLD | NEW |