Index: third_party/WebKit/LayoutTests/csspaint/paint2d-zoom.html |
diff --git a/third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html b/third_party/WebKit/LayoutTests/csspaint/paint2d-zoom.html |
similarity index 53% |
copy from third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html |
copy to third_party/WebKit/LayoutTests/csspaint/paint2d-zoom.html |
index bd0c938367ef3f9346b1c14e5486a6e812ce0e38..d68ff308ac40250369eac38de191e27d4993b2df 100644 |
--- a/third_party/WebKit/LayoutTests/csspaint/invalid-image-paint-error.html |
+++ b/third_party/WebKit/LayoutTests/csspaint/paint2d-zoom.html |
@@ -7,8 +7,7 @@ |
#output { |
width: 100px; |
height: 100px; |
- background-image: paint(error); |
- background-color: green; |
+ background-image: paint(worklet); |
} |
</style> |
</head> |
@@ -16,16 +15,20 @@ |
<div id="output"></div> |
<script id="code" type="text/worklet"> |
-registerPaint('error', class { |
+registerPaint('worklet', class { |
paint(ctx, geom) { |
- ctx.fillStyle = 'red'; |
- ctx.fillRect(0, 0, geom.width, geom.height); |
- throw Error('failed!'); |
+ ctx.strokeStyle = 'blue'; |
+ ctx.lineWidth = 4; |
+ ctx.strokeRect(20, 20, 60, 60); |
Justin Novosad
2016/07/04 15:45:58
Using a pixel-aligned rect prevents the test from
Gleb Lanbin
2016/07/06 20:36:18
Justin, can you please advice how can I do that? I
|
+ console.log('width: ' + geom.width + ', height: ' + geom.height); |
} |
}); |
</script> |
<script> |
+ if (window.testRunner) window.testRunner.dumpAsTextWithPixelResults(); |
+ document.body.style.zoom = "300%"; |
+ console.log('The worklet should log: \'width: 100, height: 100\''); |
importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('code').textContent); |
</script> |
</body> |