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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-null.html

Issue 1775153002: Make OffscreenCanvasRenderingContext2D renderable on a worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes and tests for transferToImageBitmap Created 4 years, 9 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/transferImageBitmap-null.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-alpha.html b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-null.html
similarity index 78%
copy from third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-alpha.html
copy to third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-null.html
index 57427428b2522c9c1c7c6fecf466c80eafff9ee6..5524ab86af07bc94063a110f2530b3b9092baec1 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-alpha.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-null.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<canvas id = 'dstCanvas' width='100' height='100' style='background-color:red;'></canvas>
+<canvas id = 'dstCanvas' width='100' height='100' style='background-color: green'></canvas>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
@@ -7,14 +7,15 @@ if (window.testRunner) {
var srcCanvas = document.createElement('canvas');
srcCanvas.width = srcCanvas.height = 100;
var ctx = srcCanvas.getContext('2d');
-ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ctx.fillStyle = 'red';
ctx.fillRect(0, 0, 100, 100);
createImageBitmap(srcCanvas).then(consumeImageBitmap)
function consumeImageBitmap(image) {
var dstCanvas = document.getElementById('dstCanvas');
- var dstCtx = dstCanvas.getContext('imagebitmap', { alpha: true });
+ var dstCtx = dstCanvas.getContext('imagebitmap');
dstCtx.transferImageBitmap(image);
+ dstCtx.transferImageBitmap(null);
if (window.testRunner) {
testRunner.notifyDone();
}

Powered by Google App Engine
This is Rietveld 408576698