blob: bd0c938367ef3f9346b1c14e5486a6e812ce0e38 [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>
<style>
#output {
width: 100px;
height: 100px;
background-image: paint(error);
background-color: green;
}
</style>
</head>
<body>
<div id="output"></div>
<script id="code" type="text/worklet">
registerPaint('error', class {
paint(ctx, geom) {
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, geom.width, geom.height);
throw Error('failed!');
}
});
</script>
<script>
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent);
</script>
</body>
</html>