Index: third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html |
diff --git a/third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html b/third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bd0c938367ef3f9346b1c14e5486a6e812ce0e38 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html |
@@ -0,0 +1,32 @@ |
+<!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> |