blob: edb2d78d2af93f20d031b142c556f79568266542 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/run-after-layout-and-paint.js"></script>
<script src="resources/test-runner-paint-worklet.js"></script>
<script src="resources/generate-paint-style-logging.js"></script>
<style>
div {
width: 100px;
height: 100px;
background-image: paint(test);
border-radius: 2px;
--foo: bar;
}
</style>
</head>
<body>
<div></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
importPaintWorkletAndTerminateTestAfterAsyncPaint(
generatePaintStyleLogging([
'--bar',
'--foo',
'align-items',
'border-radius',
]));
</script>
<p>This tests the style information in the paint callback.</p>
<p>See the devtools console for test output. The console should log:</p>
--bar: [null]<br>
--foo: [CSSStyleValue= bar]<br>
align-items: [CSSStyleValue=normal]<br>
border-radius: [CSSStyleValue=2px]
</body>
</html>