blob: b11e6979aaba8668361c9042ce8392f916de66de [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/run-after-layout-and-paint.js"></script>
<script src="resources/test-runner-paint-worklet.js"></script>
<style>
#output {
width: 300px;
height: 300px;
background-image: paint(image);
border-image: url("resources/html5.png");
}
</style>
<div id="output"></div>
<script id="code" type="text/worklet">
registerPaint('image', class {
static get inputProperties() { return [ 'border-image-source' ]; };
paint(ctx, geom, styleMap) {
ctx.drawImage(styleMap.get('border-image-source'), 0, 0);
}
});
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
</script>