Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html

Issue 1911793003: drawImage throw when ImageBitmap is neutered (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up code Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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});

Powered by Google App Engine
This is Rietveld 408576698