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

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: address comments 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6e791297924775976b5da96a8edf4d0eaa493161 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close.html
@@ -10,6 +10,7 @@ var imgHeight = 10;
var imgWidth = 10;
var imageData = new ImageData(10, 10);
var bitmap;
+var ctx;
createImageBitmap(imageData).then(imageBitmap => {
bitmap = imageBitmap;
shouldBe("bitmap.width", "imgWidth");
@@ -25,6 +26,12 @@ createImageBitmap(imageData).then(imageBitmap => {
shouldBe("bitmap.width", "0");
shouldBe("bitmap.height", "0");
+ var canvas = document.createElement("canvas");
+ canvas.width = imgWidth;
+ canvas.height = imgHeight;
+ ctx = canvas.getContext("2d");
+ shouldThrow("ctx.drawImage(bitmap, 0, 0)");
+
// Try to apply structured clone to an already closed bitmap
try {
worker.postMessage({data: bitmap});
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-close-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698