Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html |
index 7f6eacfa025735bc3319de0e502df5fc13aa0767..cc1860f0d17311ab379e627c897d971382ef52f0 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html |
@@ -25,6 +25,17 @@ createImageBitmap(imageData).then(imageBitmap => { |
shouldBe("bitmap.width", "0"); |
shouldBe("bitmap.height", "0"); |
+ var canvas = document.createElement("canvas"); |
+ canvas.width = imgWidth; |
+ canvas.height = imgHeight; |
+ var ctx = canvas.getContext("2d"); |
+ try { |
Justin Novosad
2016/04/21 20:45:19
In tests that include js-test.js, you might as wel
xidachen
2016/04/22 01:58:13
Done.
|
+ ctx.drawImage(bitmap, 0, 0); |
+ testFailed("Drawing a closed ImageBitmap passed unexpectedly"); |
+ } catch(ex) { |
+ testPassed("Drawing a closed ImageBitmap throws: " + ex); |
+ } |
+ |
// Try to apply structured clone to an already closed bitmap |
try { |
worker.postMessage({data: bitmap}); |