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 border-radius: 3px; | |
10 } | |
11 | |
12 div::before { | |
13 width: 100px; | |
14 height: 100px; | |
15 content: 'foo'; | |
16 | |
17 background-image: paint(test); | |
18 border-radius: 2px; | |
19 --foo: bar; | |
20 } | |
21 </style> | |
22 </head> | |
23 <body> | |
24 <div></div> | |
25 <script> | |
26 if (window.testRunner) | |
27 testRunner.dumpAsText(); | |
28 | |
29 importPaintWorkletAndTerminateTestAfterAsyncPaint( | |
30 generatePaintStyleLogging([ | |
31 '--bar', | |
32 '--foo', | |
33 'border-radius', | |
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 --bar: [null]<br> | |
39 --foo: [CSSStyleValue= bar]<br> | |
40 border-radius: [CSSStyleValue=2px] | |
41 </body> | |
42 </html> | |
OLD | NEW |