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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap.html

Issue 2251493003: Adding nullability support to ImageBitmapRenderingContext.transferImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/imagebitmap/transferFromImageBitmap.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap.html b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap.html
index b4e1e5e1e0d36c77cc05d238fcd188698d79076e..f648079bcec4f36fb52c60bd8c6f172994befbf3 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferFromImageBitmap.html
@@ -9,14 +9,21 @@ srcCanvas.width = srcCanvas.height = 100;
var ctx = srcCanvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 100, 100);
-createImageBitmap(srcCanvas).then(consumeImageBitmap)
+createImageBitmap(srcCanvas).then(consumeImageBitmap);
+testImageBitmapNullability();
+if (window.testRunner)
+ testRunner.notifyDone();
Justin Novosad 2016/08/16 19:38:55 This will cause the test to end before consumeImag
zakerinasab 2016/08/16 20:34:49 Done.
function consumeImageBitmap(image) {
var dstCanvas = document.getElementById('dstCanvas');
var dstCtx = dstCanvas.getContext('bitmaprenderer');
dstCtx.transferFromImageBitmap(image);
- if (window.testRunner) {
- testRunner.notifyDone();
- }
}
-</script>
+
+function testImageBitmapNullability() {
+ var dstCanvas = document.getElementById('dstCanvas');
+ var dstCtx = dstCanvas.getContext('bitmaprenderer');
+ dstCtx.transferFromImageBitmap(null);
+}
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698