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 width: 100px; | |
10 height: 100px; | |
11 | |
12 background-image: paint(test); | |
13 | |
14 --length: 10px; | |
15 --number: 10; | |
16 } | |
17 </style> | |
18 </head> | |
19 <body> | |
20 <div></div> | |
21 <script> | |
22 if (window.testRunner) | |
23 testRunner.dumpAsText(); | |
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( | |
30 generatePaintStyleLogging([ | |
31 '--length', | |
32 '--length-initial', | |
33 '--number', | |
34 ])); | |
35 </script> | |
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> | |
38 --length: [CSSSimpleLength=10px]<br> | |
39 --length-initial: [CSSSimpleLength=20px]<br> | |
40 --number: [CSSNumberValue=10]<br> | |
41 | |
42 </html> | |
OLD | NEW |